| 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 public mojom::RenderWidgetWindowTreeClientFactory { | 42 public mojom::RenderWidgetWindowTreeClientFactory { |
| 43 public: | 43 public: |
| 44 RenderWidgetWindowTreeClientFactoryImpl() : weak_factory_(this) { | 44 RenderWidgetWindowTreeClientFactoryImpl() : weak_factory_(this) { |
| 45 main_thread_task_runner_ = base::ThreadTaskRunnerHandle::Get(); | 45 main_thread_task_runner_ = base::ThreadTaskRunnerHandle::Get(); |
| 46 } | 46 } |
| 47 | 47 |
| 48 ~RenderWidgetWindowTreeClientFactoryImpl() override {} | 48 ~RenderWidgetWindowTreeClientFactoryImpl() override {} |
| 49 | 49 |
| 50 private: | 50 private: |
| 51 // ConnectionFilter implementation: | 51 // ConnectionFilter implementation: |
| 52 bool OnConnect(const shell::Identity& remote_identity, | 52 bool OnConnect(const service_manager::Identity& remote_identity, |
| 53 shell::InterfaceRegistry* registry, | 53 service_manager::InterfaceRegistry* registry, |
| 54 shell::Connector* connector) override { | 54 service_manager::Connector* connector) override { |
| 55 registry->AddInterface( | 55 registry->AddInterface( |
| 56 base::Bind(&RenderWidgetWindowTreeClientFactoryImpl::CreateFactory, | 56 base::Bind(&RenderWidgetWindowTreeClientFactoryImpl::CreateFactory, |
| 57 weak_factory_.GetWeakPtr())); | 57 weak_factory_.GetWeakPtr())); |
| 58 return true; | 58 return true; |
| 59 } | 59 } |
| 60 | 60 |
| 61 // mojom::RenderWidgetWindowTreeClientFactory implementation. | 61 // mojom::RenderWidgetWindowTreeClientFactory implementation. |
| 62 void CreateWindowTreeClientForRenderWidget( | 62 void CreateWindowTreeClientForRenderWidget( |
| 63 uint32_t routing_id, | 63 uint32_t routing_id, |
| 64 ui::mojom::WindowTreeClientRequest request) override { | 64 ui::mojom::WindowTreeClientRequest request) override { |
| (...skipping 16 matching lines...) Expand all Loading... |
| 81 | 81 |
| 82 } // namespace | 82 } // namespace |
| 83 | 83 |
| 84 void CreateRenderWidgetWindowTreeClientFactory( | 84 void CreateRenderWidgetWindowTreeClientFactory( |
| 85 ServiceManagerConnection* connection) { | 85 ServiceManagerConnection* connection) { |
| 86 connection->AddConnectionFilter( | 86 connection->AddConnectionFilter( |
| 87 base::MakeUnique<RenderWidgetWindowTreeClientFactoryImpl>()); | 87 base::MakeUnique<RenderWidgetWindowTreeClientFactoryImpl>()); |
| 88 } | 88 } |
| 89 | 89 |
| 90 } // namespace content | 90 } // namespace content |
| OLD | NEW |