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

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: Rebase Created 3 years, 11 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
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..21c6ec6fcd6533054fdcce930f1043d1d0086fcc
--- /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 getInterface(const char* serviceName,
+ const char* interfaceName,
+ mojo::ScopedMessagePipeHandle) = 0;
+
+ template <typename Interface>
+ void getInterface(const char* serviceName,
+ mojo::InterfaceRequest<Interface> ptr) {
+ getInterface(serviceName, Interface::Name_, ptr.PassMessagePipe());
+ }
+
+ static Connector* getEmptyConnector();
+};
+
+} // namespace blink
+
+#endif

Powered by Google App Engine
This is Rietveld 408576698