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

Unified Diff: third_party/WebKit/public/platform/Connector.h

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/public/BUILD.gn ('k') | third_party/WebKit/public/platform/Platform.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/public/platform/Connector.h
diff --git a/third_party/WebKit/public/platform/Connector.h b/third_party/WebKit/public/platform/Connector.h
new file mode 100644
index 0000000000000000000000000000000000000000..666eea59020ff8775b470feb95d7dd1c8642ef1e
--- /dev/null
+++ b/third_party/WebKit/public/platform/Connector.h
@@ -0,0 +1,32 @@
+// 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.
+
+#ifndef Connector_h
+#define Connector_h
+
+#include "mojo/public/cpp/bindings/interface_request.h"
+#include "mojo/public/cpp/system/message_pipe.h"
+#include "public/platform/WebCommon.h"
+
+namespace blink {
+
+// Supports obtaining interfaces from services specified by name.
+class BLINK_PLATFORM_EXPORT Connector {
+ public:
+ virtual void bindInterface(const char* serviceName,
+ const char* interfaceName,
+ mojo::ScopedMessagePipeHandle) = 0;
+
+ template <typename Interface>
+ void bindInterface(const char* serviceName,
+ mojo::InterfaceRequest<Interface> ptr) {
+ bindInterface(serviceName, Interface::Name_, ptr.PassMessagePipe());
+ }
+
+ static Connector* getEmptyConnector();
+};
+
+} // namespace blink
+
+#endif
« no previous file with comments | « third_party/WebKit/public/BUILD.gn ('k') | third_party/WebKit/public/platform/Platform.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698