Index: content/browser/render_widget_view_service_listener.h |
diff --git a/content/browser/render_widget_view_service_listener.h b/content/browser/render_widget_view_service_listener.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..966301bfe67128f75a0dfc607fee3be7cf65db5f |
--- /dev/null |
+++ b/content/browser/render_widget_view_service_listener.h |
@@ -0,0 +1,60 @@ |
+// Copyright 2015 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 CONTENT_BROWSER_MOJO_CONNECTION_LISTENER_H_ |
+#define CONTENT_BROWSER_MOJO_CONNECTION_LISTENER_H_ |
+ |
+#include "base/macros.h" |
+#include "content/common/render_widget_view.mojom.h" |
+#include "content/public/common/mojo_shell_connection.h" |
+#include "mojo/application/public/cpp/interface_factory.h" |
+#include "mojo/common/weak_binding_set.h" |
+#include "mojo/public/cpp/bindings/strong_binding.h" |
+ |
+namespace content { |
+ |
+class RenderWidgetViewFactoryImpl : public mojom::RenderWidgetViewFactory { |
Ben Goodger (Google)
2015/11/24 06:42:40
Move both these classes to an anon namespace in th
Fady Samuel
2015/11/24 13:32:06
Done.
|
+ public: |
+ RenderWidgetViewFactoryImpl( |
+ int render_process_id, |
+ mojo::InterfaceRequest<mojom::RenderWidgetViewFactory> request); |
+ ~RenderWidgetViewFactoryImpl() override; |
+ |
+ private: |
+ // mojom::RenderWidgetViewFactory implementation. |
+ void CreateRenderWidgetView( |
+ uint32_t routing_id, |
+ mus::mojom::WindowTreeClientPtr tree_client) override; |
+ |
+ const int render_process_id_; |
+ mojo::StrongBinding<RenderWidgetViewFactory> binding_; |
+ DISALLOW_COPY_AND_ASSIGN(RenderWidgetViewFactoryImpl); |
+}; |
+ |
+class RenderWidgetViewServiceListener |
+ : public MojoShellConnection::Listener, |
+ public mojo::InterfaceFactory<mojom::RenderWidgetViewFactory> { |
+ public: |
+ static void Create(); |
+ |
+ private: |
+ RenderWidgetViewServiceListener(); |
+ ~RenderWidgetViewServiceListener() override; |
+ |
+ // MojoShellConnection::Listener implementation: |
+ bool ConfigureIncomingConnection( |
+ mojo::ApplicationConnection* connection) override; |
+ void OnDestroy() override; |
+ |
+ // mojo::InterfaceFactory<mojom::RenderWidgetViewFactory>: |
+ void Create( |
+ mojo::ApplicationConnection* connection, |
+ mojo::InterfaceRequest<mojom::RenderWidgetViewFactory> request) override; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(RenderWidgetViewServiceListener); |
+}; |
+ |
+} // namespace content |
+ |
+#endif // CONTENT_BROWSER_MOJO_CONNECTION_LISTENER_H_ |