| 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 13 matching lines...) Expand all Loading... |
| 24 #include "services/ui/public/interfaces/window_tree.mojom.h" | 24 #include "services/ui/public/interfaces/window_tree.mojom.h" |
| 25 #include "url/gurl.h" | 25 #include "url/gurl.h" |
| 26 | 26 |
| 27 namespace content { | 27 namespace content { |
| 28 | 28 |
| 29 namespace { | 29 namespace { |
| 30 | 30 |
| 31 void BindMusConnectionOnMainThread( | 31 void BindMusConnectionOnMainThread( |
| 32 uint32_t routing_id, | 32 uint32_t routing_id, |
| 33 ui::mojom::WindowTreeClientRequest request) { | 33 ui::mojom::WindowTreeClientRequest request) { |
| 34 RendererWindowTreeClient::CreateIfNecessary(routing_id); |
| 34 RendererWindowTreeClient::Get(routing_id)->Bind(std::move(request)); | 35 RendererWindowTreeClient::Get(routing_id)->Bind(std::move(request)); |
| 35 } | 36 } |
| 36 | 37 |
| 37 // This object's lifetime is managed by ServiceManagerConnection because it's a | 38 // This object's lifetime is managed by ServiceManagerConnection because it's a |
| 38 // registered with it. | 39 // registered with it. |
| 39 class RenderWidgetWindowTreeClientFactoryImpl | 40 class RenderWidgetWindowTreeClientFactoryImpl |
| 40 : public ConnectionFilter, | 41 : public ConnectionFilter, |
| 41 public mojom::RenderWidgetWindowTreeClientFactory { | 42 public mojom::RenderWidgetWindowTreeClientFactory { |
| 42 public: | 43 public: |
| 43 RenderWidgetWindowTreeClientFactoryImpl() : weak_factory_(this) { | 44 RenderWidgetWindowTreeClientFactoryImpl() : weak_factory_(this) { |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 | 81 |
| 81 } // namespace | 82 } // namespace |
| 82 | 83 |
| 83 void CreateRenderWidgetWindowTreeClientFactory( | 84 void CreateRenderWidgetWindowTreeClientFactory( |
| 84 ServiceManagerConnection* connection) { | 85 ServiceManagerConnection* 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 |