Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(832)

Unified Diff: third_party/WebKit/Source/platform/exported/ServiceRegistry.cpp

Issue 2643063002: Refactor Blink's ServiceConnector and add ability to mock in layout tests (Closed)
Patch Set: Fix build Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/platform/exported/Platform.cpp ('k') | third_party/WebKit/public/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/exported/ServiceRegistry.cpp
diff --git a/third_party/WebKit/Source/platform/exported/ServiceRegistry.cpp b/third_party/WebKit/Source/platform/exported/ServiceRegistry.cpp
index b649b3013749c0036478b3dde8773045a59865e8..9689eaf51d8c2d6037c546f61f895c9655b6696d 100644
--- a/third_party/WebKit/Source/platform/exported/ServiceRegistry.cpp
+++ b/third_party/WebKit/Source/platform/exported/ServiceRegistry.cpp
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "public/platform/Connector.h"
#include "public/platform/InterfaceProvider.h"
#include "wtf/StdLibExtras.h"
@@ -9,11 +10,22 @@
namespace blink {
namespace {
+class EmptyConnector : public Connector {
+ void bindInterface(const char* serviceName,
+ const char* interfaceName,
+ mojo::ScopedMessagePipeHandle) override {}
+};
+
class EmptyInterfaceProvider : public InterfaceProvider {
void getInterface(const char* name, mojo::ScopedMessagePipeHandle) override {}
};
}
+Connector* Connector::getEmptyConnector() {
+ DEFINE_STATIC_LOCAL(EmptyConnector, emptyConnector, ());
+ return &emptyConnector;
+}
+
InterfaceProvider* InterfaceProvider::getEmptyInterfaceProvider() {
DEFINE_STATIC_LOCAL(EmptyInterfaceProvider, emptyInterfaceProvider, ());
return &emptyInterfaceProvider;
« no previous file with comments | « third_party/WebKit/Source/platform/exported/Platform.cpp ('k') | third_party/WebKit/public/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698