| 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 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 388 tree_->Embed(window_id, std::move(client), flags, callback); | 388 tree_->Embed(window_id, std::move(client), flags, callback); |
| 389 } | 389 } |
| 390 | 390 |
| 391 void WindowTreeClient::RequestClose(Window* window) { | 391 void WindowTreeClient::RequestClose(Window* window) { |
| 392 if (window_manager_internal_client_) | 392 if (window_manager_internal_client_) |
| 393 window_manager_internal_client_->WmRequestClose(server_id(window)); | 393 window_manager_internal_client_->WmRequestClose(server_id(window)); |
| 394 } | 394 } |
| 395 | 395 |
| 396 void WindowTreeClient::AttachCompositorFrameSink( | 396 void WindowTreeClient::AttachCompositorFrameSink( |
| 397 Id window_id, | 397 Id window_id, |
| 398 mojom::CompositorFrameSinkType type, | |
| 399 cc::mojom::MojoCompositorFrameSinkRequest compositor_frame_sink, | 398 cc::mojom::MojoCompositorFrameSinkRequest compositor_frame_sink, |
| 400 cc::mojom::MojoCompositorFrameSinkClientPtr client) { | 399 cc::mojom::MojoCompositorFrameSinkClientPtr client) { |
| 401 DCHECK(tree_); | 400 DCHECK(tree_); |
| 402 tree_->AttachCompositorFrameSink( | 401 tree_->AttachCompositorFrameSink(window_id, std::move(compositor_frame_sink), |
| 403 window_id, type, std::move(compositor_frame_sink), std::move(client)); | 402 std::move(client)); |
| 404 } | 403 } |
| 405 | 404 |
| 406 void WindowTreeClient::LocalSetCapture(Window* window) { | 405 void WindowTreeClient::LocalSetCapture(Window* window) { |
| 407 if (capture_window_ == window) | 406 if (capture_window_ == window) |
| 408 return; | 407 return; |
| 409 Window* lost_capture = capture_window_; | 408 Window* lost_capture = capture_window_; |
| 410 capture_window_ = window; | 409 capture_window_ = window; |
| 411 if (lost_capture) { | 410 if (lost_capture) { |
| 412 for (auto& observer : *WindowPrivate(lost_capture).observers()) | 411 for (auto& observer : *WindowPrivate(lost_capture).observers()) |
| 413 observer.OnWindowLostCapture(lost_capture); | 412 observer.OnWindowLostCapture(lost_capture); |
| (...skipping 1057 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1471 // TODO(riajiang): Figure out if |offset| needs to be converted. | 1470 // TODO(riajiang): Figure out if |offset| needs to be converted. |
| 1472 // (http://crbugs.com/646932) | 1471 // (http://crbugs.com/646932) |
| 1473 window_manager_internal_client_->SetUnderlaySurfaceOffsetAndExtendedHitArea( | 1472 window_manager_internal_client_->SetUnderlaySurfaceOffsetAndExtendedHitArea( |
| 1474 server_id(window), offset.x(), offset.y(), | 1473 server_id(window), offset.x(), offset.y(), |
| 1475 gfx::ConvertInsetsToDIP(ScaleFactorForDisplay(window->display_id()), | 1474 gfx::ConvertInsetsToDIP(ScaleFactorForDisplay(window->display_id()), |
| 1476 hit_area)); | 1475 hit_area)); |
| 1477 } | 1476 } |
| 1478 } | 1477 } |
| 1479 | 1478 |
| 1480 } // namespace ui | 1479 } // namespace ui |
| OLD | NEW |