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 "components/mus/public/cpp/lib/window_tree_client_impl.h" | 5 #include "components/mus/public/cpp/lib/window_tree_client_impl.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "components/mus/common/util.h" | 8 #include "components/mus/common/util.h" |
9 #include "components/mus/public/cpp/lib/in_flight_change.h" | 9 #include "components/mus/public/cpp/lib/in_flight_change.h" |
10 #include "components/mus/public/cpp/lib/window_private.h" | 10 #include "components/mus/public/cpp/lib/window_private.h" |
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
256 | 256 |
257 void WindowTreeClientImpl::Embed( | 257 void WindowTreeClientImpl::Embed( |
258 Id window_id, | 258 Id window_id, |
259 mojom::WindowTreeClientPtr client, | 259 mojom::WindowTreeClientPtr client, |
260 uint32_t policy_bitmask, | 260 uint32_t policy_bitmask, |
261 const mojom::WindowTree::EmbedCallback& callback) { | 261 const mojom::WindowTree::EmbedCallback& callback) { |
262 DCHECK(tree_); | 262 DCHECK(tree_); |
263 tree_->Embed(window_id, client.Pass(), policy_bitmask, callback); | 263 tree_->Embed(window_id, client.Pass(), policy_bitmask, callback); |
264 } | 264 } |
265 | 265 |
266 void WindowTreeClientImpl::RequestSurface( | 266 void WindowTreeClientImpl::AttachSurface( |
267 Id window_id, | 267 Id window_id, |
268 mojom::SurfaceType type, | 268 mojom::SurfaceType type, |
269 mojo::InterfaceRequest<mojom::Surface> surface, | 269 mojo::InterfaceRequest<mojom::Surface> surface, |
270 mojom::SurfaceClientPtr client) { | 270 mojom::SurfaceClientPtr client) { |
271 DCHECK(tree_); | 271 DCHECK(tree_); |
272 tree_->RequestSurface(window_id, type, surface.Pass(), client.Pass()); | 272 tree_->AttachSurface(window_id, type, surface.Pass(), client.Pass()); |
273 } | 273 } |
274 | 274 |
275 void WindowTreeClientImpl::AddWindow(Window* window) { | 275 void WindowTreeClientImpl::AddWindow(Window* window) { |
276 DCHECK(windows_.find(window->id()) == windows_.end()); | 276 DCHECK(windows_.find(window->id()) == windows_.end()); |
277 windows_[window->id()] = window; | 277 windows_[window->id()] = window; |
278 } | 278 } |
279 | 279 |
280 void WindowTreeClientImpl::RemoveWindow(Id window_id) { | 280 void WindowTreeClientImpl::RemoveWindow(Id window_id) { |
281 if (focused_window_ && focused_window_->id() == window_id) | 281 if (focused_window_ && focused_window_->id() == window_id) |
282 OnWindowFocused(0); | 282 OnWindowFocused(0); |
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
657 void WindowTreeClientImpl::OnActionCompleted(bool success) { | 657 void WindowTreeClientImpl::OnActionCompleted(bool success) { |
658 if (!change_acked_callback_.is_null()) | 658 if (!change_acked_callback_.is_null()) |
659 change_acked_callback_.Run(); | 659 change_acked_callback_.Run(); |
660 } | 660 } |
661 | 661 |
662 mojo::Callback<void(bool)> WindowTreeClientImpl::ActionCompletedCallback() { | 662 mojo::Callback<void(bool)> WindowTreeClientImpl::ActionCompletedCallback() { |
663 return [this](bool success) { OnActionCompleted(success); }; | 663 return [this](bool success) { OnActionCompleted(success); }; |
664 } | 664 } |
665 | 665 |
666 } // namespace mus | 666 } // namespace mus |
OLD | NEW |