| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "services/ui/public/cpp/window_tree_client.h" | 5 #include "services/ui/public/cpp/window_tree_client.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 FOR_EACH_OBSERVER(WindowTreeClientObserver, observers_, | 116 FOR_EACH_OBSERVER(WindowTreeClientObserver, observers_, |
| 117 OnDidDestroyClient(this)); | 117 OnDidDestroyClient(this)); |
| 118 } | 118 } |
| 119 | 119 |
| 120 void WindowTreeClient::ConnectViaWindowTreeFactory( | 120 void WindowTreeClient::ConnectViaWindowTreeFactory( |
| 121 shell::Connector* connector) { | 121 shell::Connector* connector) { |
| 122 // The client id doesn't really matter, we use 101 purely for debugging. | 122 // The client id doesn't really matter, we use 101 purely for debugging. |
| 123 client_id_ = 101; | 123 client_id_ = 101; |
| 124 | 124 |
| 125 mojom::WindowTreeFactoryPtr factory; | 125 mojom::WindowTreeFactoryPtr factory; |
| 126 connector->ConnectToInterface("mojo:ui", &factory); | 126 connector->ConnectToInterface("service:ui", &factory); |
| 127 mojom::WindowTreePtr window_tree; | 127 mojom::WindowTreePtr window_tree; |
| 128 factory->CreateWindowTree(GetProxy(&window_tree), | 128 factory->CreateWindowTree(GetProxy(&window_tree), |
| 129 binding_.CreateInterfacePtrAndBind()); | 129 binding_.CreateInterfacePtrAndBind()); |
| 130 SetWindowTree(std::move(window_tree)); | 130 SetWindowTree(std::move(window_tree)); |
| 131 } | 131 } |
| 132 | 132 |
| 133 void WindowTreeClient::ConnectAsWindowManager(shell::Connector* connector) { | 133 void WindowTreeClient::ConnectAsWindowManager(shell::Connector* connector) { |
| 134 DCHECK(window_manager_delegate_); | 134 DCHECK(window_manager_delegate_); |
| 135 | 135 |
| 136 mojom::WindowManagerWindowTreeFactoryPtr factory; | 136 mojom::WindowManagerWindowTreeFactoryPtr factory; |
| 137 connector->ConnectToInterface("mojo:ui", &factory); | 137 connector->ConnectToInterface("service:ui", &factory); |
| 138 mojom::WindowTreePtr window_tree; | 138 mojom::WindowTreePtr window_tree; |
| 139 factory->CreateWindowTree(GetProxy(&window_tree), | 139 factory->CreateWindowTree(GetProxy(&window_tree), |
| 140 binding_.CreateInterfacePtrAndBind()); | 140 binding_.CreateInterfacePtrAndBind()); |
| 141 SetWindowTree(std::move(window_tree)); | 141 SetWindowTree(std::move(window_tree)); |
| 142 } | 142 } |
| 143 | 143 |
| 144 void WindowTreeClient::WaitForEmbed() { | 144 void WindowTreeClient::WaitForEmbed() { |
| 145 DCHECK(roots_.empty()); | 145 DCHECK(roots_.empty()); |
| 146 // OnEmbed() is the first function called. | 146 // OnEmbed() is the first function called. |
| 147 binding_.WaitForIncomingMethodCall(); | 147 binding_.WaitForIncomingMethodCall(); |
| (...skipping 1258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1406 Window* window, | 1406 Window* window, |
| 1407 const gfx::Vector2d& offset, | 1407 const gfx::Vector2d& offset, |
| 1408 const gfx::Insets& hit_area) { | 1408 const gfx::Insets& hit_area) { |
| 1409 if (window_manager_internal_client_) { | 1409 if (window_manager_internal_client_) { |
| 1410 window_manager_internal_client_->SetUnderlaySurfaceOffsetAndExtendedHitArea( | 1410 window_manager_internal_client_->SetUnderlaySurfaceOffsetAndExtendedHitArea( |
| 1411 server_id(window), offset.x(), offset.y(), hit_area); | 1411 server_id(window), offset.x(), offset.y(), hit_area); |
| 1412 } | 1412 } |
| 1413 } | 1413 } |
| 1414 | 1414 |
| 1415 } // namespace ui | 1415 } // namespace ui |
| OLD | NEW |