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 "ui/aura/mus/window_tree_client.h" | 5 #include "ui/aura/mus/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 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 capture_synchronizer_.reset(); | 198 capture_synchronizer_.reset(); |
199 | 199 |
200 client::GetTransientWindowClient()->RemoveObserver(this); | 200 client::GetTransientWindowClient()->RemoveObserver(this); |
201 } | 201 } |
202 | 202 |
203 void WindowTreeClient::ConnectViaWindowTreeFactory() { | 203 void WindowTreeClient::ConnectViaWindowTreeFactory() { |
204 // The client id doesn't really matter, we use 101 purely for debugging. | 204 // The client id doesn't really matter, we use 101 purely for debugging. |
205 client_id_ = 101; | 205 client_id_ = 101; |
206 | 206 |
207 ui::mojom::WindowTreeFactoryPtr factory; | 207 ui::mojom::WindowTreeFactoryPtr factory; |
208 connector_->ConnectToInterface(ui::mojom::kServiceName, &factory); | 208 connector_->BindInterface(ui::mojom::kServiceName, &factory); |
209 ui::mojom::WindowTreePtr window_tree; | 209 ui::mojom::WindowTreePtr window_tree; |
210 factory->CreateWindowTree(MakeRequest(&window_tree), | 210 factory->CreateWindowTree(MakeRequest(&window_tree), |
211 binding_.CreateInterfacePtrAndBind()); | 211 binding_.CreateInterfacePtrAndBind()); |
212 SetWindowTree(std::move(window_tree)); | 212 SetWindowTree(std::move(window_tree)); |
213 } | 213 } |
214 | 214 |
215 void WindowTreeClient::ConnectAsWindowManager() { | 215 void WindowTreeClient::ConnectAsWindowManager() { |
216 DCHECK(window_manager_delegate_); | 216 DCHECK(window_manager_delegate_); |
217 | 217 |
218 ui::mojom::WindowManagerWindowTreeFactoryPtr factory; | 218 ui::mojom::WindowManagerWindowTreeFactoryPtr factory; |
219 connector_->ConnectToInterface(ui::mojom::kServiceName, &factory); | 219 connector_->BindInterface(ui::mojom::kServiceName, &factory); |
220 ui::mojom::WindowTreePtr window_tree; | 220 ui::mojom::WindowTreePtr window_tree; |
221 factory->CreateWindowTree(MakeRequest(&window_tree), | 221 factory->CreateWindowTree(MakeRequest(&window_tree), |
222 binding_.CreateInterfacePtrAndBind()); | 222 binding_.CreateInterfacePtrAndBind()); |
223 SetWindowTree(std::move(window_tree)); | 223 SetWindowTree(std::move(window_tree)); |
224 } | 224 } |
225 | 225 |
226 client::CaptureClient* WindowTreeClient::GetCaptureClient() { | 226 client::CaptureClient* WindowTreeClient::GetCaptureClient() { |
227 return delegate_->GetCaptureClient(); | 227 return delegate_->GetCaptureClient(); |
228 } | 228 } |
229 | 229 |
(...skipping 1464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1694 return ScheduleInFlightChange(base::MakeUnique<InFlightCaptureChange>( | 1694 return ScheduleInFlightChange(base::MakeUnique<InFlightCaptureChange>( |
1695 this, capture_synchronizer_.get(), window)); | 1695 this, capture_synchronizer_.get(), window)); |
1696 } | 1696 } |
1697 | 1697 |
1698 uint32_t WindowTreeClient::CreateChangeIdForFocus(WindowMus* window) { | 1698 uint32_t WindowTreeClient::CreateChangeIdForFocus(WindowMus* window) { |
1699 return ScheduleInFlightChange(base::MakeUnique<InFlightFocusChange>( | 1699 return ScheduleInFlightChange(base::MakeUnique<InFlightFocusChange>( |
1700 this, focus_synchronizer_.get(), window)); | 1700 this, focus_synchronizer_.get(), window)); |
1701 } | 1701 } |
1702 | 1702 |
1703 } // namespace aura | 1703 } // namespace aura |
OLD | NEW |