| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "content/renderer/mus/render_widget_window_tree_client_factory.h" | 5 #include "content/renderer/mus/render_widget_window_tree_client_factory.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 public mojom::RenderWidgetWindowTreeClientFactory { | 43 public mojom::RenderWidgetWindowTreeClientFactory { |
| 44 public: | 44 public: |
| 45 RenderWidgetWindowTreeClientFactoryImpl() { | 45 RenderWidgetWindowTreeClientFactoryImpl() { |
| 46 main_thread_task_runner_ = base::ThreadTaskRunnerHandle::Get(); | 46 main_thread_task_runner_ = base::ThreadTaskRunnerHandle::Get(); |
| 47 } | 47 } |
| 48 | 48 |
| 49 ~RenderWidgetWindowTreeClientFactoryImpl() override {} | 49 ~RenderWidgetWindowTreeClientFactoryImpl() override {} |
| 50 | 50 |
| 51 private: | 51 private: |
| 52 // ConnectionFilter implementation: | 52 // ConnectionFilter implementation: |
| 53 bool OnConnect(shell::Connection* connection, | 53 bool OnConnect(const shell::Identity& remote_identity, |
| 54 shell::InterfaceRegistry* registry, |
| 54 shell::Connector* connector) override { | 55 shell::Connector* connector) override { |
| 55 connection->AddInterface<mojom::RenderWidgetWindowTreeClientFactory>(this); | 56 registry->AddInterface<mojom::RenderWidgetWindowTreeClientFactory>(this); |
| 56 return true; | 57 return true; |
| 57 } | 58 } |
| 58 | 59 |
| 59 // shell::InterfaceFactory<mojom::RenderWidgetWindowTreeClientFactory>: | 60 // shell::InterfaceFactory<mojom::RenderWidgetWindowTreeClientFactory>: |
| 60 void Create(const shell::Identity& remote_identity, | 61 void Create(const shell::Identity& remote_identity, |
| 61 mojo::InterfaceRequest<mojom::RenderWidgetWindowTreeClientFactory> | 62 mojo::InterfaceRequest<mojom::RenderWidgetWindowTreeClientFactory> |
| 62 request) override { | 63 request) override { |
| 63 bindings_.AddBinding(this, std::move(request)); | 64 bindings_.AddBinding(this, std::move(request)); |
| 64 } | 65 } |
| 65 | 66 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 80 | 81 |
| 81 } // namespace | 82 } // namespace |
| 82 | 83 |
| 83 void CreateRenderWidgetWindowTreeClientFactory( | 84 void CreateRenderWidgetWindowTreeClientFactory( |
| 84 MojoShellConnection* connection) { | 85 MojoShellConnection* connection) { |
| 85 connection->AddConnectionFilter( | 86 connection->AddConnectionFilter( |
| 86 base::MakeUnique<RenderWidgetWindowTreeClientFactoryImpl>()); | 87 base::MakeUnique<RenderWidgetWindowTreeClientFactoryImpl>()); |
| 87 } | 88 } |
| 88 | 89 |
| 89 } // namespace content | 90 } // namespace content |
| OLD | NEW |