Chromium Code Reviews| Index: third_party/WebKit/Source/platform/PlatformMojoServices.cpp |
| diff --git a/third_party/WebKit/Source/platform/PlatformMojoServices.cpp b/third_party/WebKit/Source/platform/PlatformMojoServices.cpp |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..2e0131055d89351c360a2e26487bce4da1ad3704 |
| --- /dev/null |
| +++ b/third_party/WebKit/Source/platform/PlatformMojoServices.cpp |
| @@ -0,0 +1,25 @@ |
| +// Copyright 2016 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#include "platform/PlatformMojoServices.h" |
| + |
| +#include "public/platform/Platform.h" |
| +#include "public/platform/ServiceRegistry.h" |
| + |
| +namespace blink { |
| + |
| +PlatformMojoServices::PlatformMojoServices() |
| +{ |
| +} |
| + |
| +const mojom::blink::ResourceHintsHandlerPtr& PlatformMojoServices::resourceHintsHandler() |
| +{ |
|
kinuko
2016/06/23 15:38:07
Platform methods are exposed to any threads so pot
|
| + // Lazily bind to the service. |
| + if (!m_resourceHintsHandler.is_bound()) { |
| + Platform::current()->serviceRegistry()->connectToRemoteService(mojo::GetProxy(&m_resourceHintsHandler)); |
| + } |
| + return m_resourceHintsHandler; |
| +} |
| + |
| +} // namespace blink |