Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CONTENT_BROWSER_MOJO_CONNECTION_LISTENER_H_ | |
| 6 #define CONTENT_BROWSER_MOJO_CONNECTION_LISTENER_H_ | |
| 7 | |
| 8 #include "base/macros.h" | |
| 9 #include "content/common/render_widget_view.mojom.h" | |
| 10 #include "content/public/common/mojo_shell_connection.h" | |
| 11 #include "mojo/application/public/cpp/interface_factory.h" | |
| 12 #include "mojo/common/weak_binding_set.h" | |
| 13 #include "mojo/public/cpp/bindings/strong_binding.h" | |
| 14 | |
| 15 namespace content { | |
| 16 | |
| 17 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.
| |
| 18 public: | |
| 19 RenderWidgetViewFactoryImpl( | |
| 20 int render_process_id, | |
| 21 mojo::InterfaceRequest<mojom::RenderWidgetViewFactory> request); | |
| 22 ~RenderWidgetViewFactoryImpl() override; | |
| 23 | |
| 24 private: | |
| 25 // mojom::RenderWidgetViewFactory implementation. | |
| 26 void CreateRenderWidgetView( | |
| 27 uint32_t routing_id, | |
| 28 mus::mojom::WindowTreeClientPtr tree_client) override; | |
| 29 | |
| 30 const int render_process_id_; | |
| 31 mojo::StrongBinding<RenderWidgetViewFactory> binding_; | |
| 32 DISALLOW_COPY_AND_ASSIGN(RenderWidgetViewFactoryImpl); | |
| 33 }; | |
| 34 | |
| 35 class RenderWidgetViewServiceListener | |
| 36 : public MojoShellConnection::Listener, | |
| 37 public mojo::InterfaceFactory<mojom::RenderWidgetViewFactory> { | |
| 38 public: | |
| 39 static void Create(); | |
| 40 | |
| 41 private: | |
| 42 RenderWidgetViewServiceListener(); | |
| 43 ~RenderWidgetViewServiceListener() override; | |
| 44 | |
| 45 // MojoShellConnection::Listener implementation: | |
| 46 bool ConfigureIncomingConnection( | |
| 47 mojo::ApplicationConnection* connection) override; | |
| 48 void OnDestroy() override; | |
| 49 | |
| 50 // mojo::InterfaceFactory<mojom::RenderWidgetViewFactory>: | |
| 51 void Create( | |
| 52 mojo::ApplicationConnection* connection, | |
| 53 mojo::InterfaceRequest<mojom::RenderWidgetViewFactory> request) override; | |
| 54 | |
| 55 DISALLOW_COPY_AND_ASSIGN(RenderWidgetViewServiceListener); | |
| 56 }; | |
| 57 | |
| 58 } // namespace content | |
| 59 | |
| 60 #endif // CONTENT_BROWSER_MOJO_CONNECTION_LISTENER_H_ | |
| OLD | NEW |