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 1467 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1478 void WindowTreeClient::WmClientJankinessChanged(ClientSpecificId client_id, | 1478 void WindowTreeClient::WmClientJankinessChanged(ClientSpecificId client_id, |
1479 bool janky) { | 1479 bool janky) { |
1480 if (window_manager_delegate_) { | 1480 if (window_manager_delegate_) { |
1481 auto it = embedded_windows_.find(client_id); | 1481 auto it = embedded_windows_.find(client_id); |
1482 CHECK(it != embedded_windows_.end()); | 1482 CHECK(it != embedded_windows_.end()); |
1483 window_manager_delegate_->OnWmClientJankinessChanged( | 1483 window_manager_delegate_->OnWmClientJankinessChanged( |
1484 embedded_windows_[client_id], janky); | 1484 embedded_windows_[client_id], janky); |
1485 } | 1485 } |
1486 } | 1486 } |
1487 | 1487 |
| 1488 void WindowTreeClient::WmBuildDragImage(const gfx::Point& cursor_location, |
| 1489 const SkBitmap& drag_image, |
| 1490 const gfx::Vector2d& drag_image_offset, |
| 1491 ui::mojom::DragEventSource source) { |
| 1492 if (!window_manager_delegate_) |
| 1493 return; |
| 1494 |
| 1495 window_manager_delegate_->OnWmBuildDragImage(cursor_location, drag_image, |
| 1496 drag_image_offset, source); |
| 1497 } |
| 1498 |
| 1499 void WindowTreeClient::WmMoveDragImage( |
| 1500 const gfx::Point& cursor_location, |
| 1501 const WmMoveDragImageCallback& callback) { |
| 1502 if (!window_manager_delegate_) { |
| 1503 callback.Run(); |
| 1504 return; |
| 1505 } |
| 1506 |
| 1507 window_manager_delegate_->OnWmMoveDragImage(cursor_location); |
| 1508 callback.Run(); |
| 1509 } |
| 1510 |
| 1511 void WindowTreeClient::WmDestroyDragImage() { |
| 1512 if (!window_manager_delegate_) |
| 1513 return; |
| 1514 |
| 1515 window_manager_delegate_->OnWmDestroyDragImage(); |
| 1516 } |
| 1517 |
1488 void WindowTreeClient::WmPerformMoveLoop(uint32_t change_id, | 1518 void WindowTreeClient::WmPerformMoveLoop(uint32_t change_id, |
1489 Id window_id, | 1519 Id window_id, |
1490 ui::mojom::MoveLoopSource source, | 1520 ui::mojom::MoveLoopSource source, |
1491 const gfx::Point& cursor_location) { | 1521 const gfx::Point& cursor_location) { |
1492 if (!window_manager_delegate_ || current_wm_move_loop_change_ != 0) { | 1522 if (!window_manager_delegate_ || current_wm_move_loop_change_ != 0) { |
1493 OnWmMoveLoopCompleted(change_id, false); | 1523 OnWmMoveLoopCompleted(change_id, false); |
1494 return; | 1524 return; |
1495 } | 1525 } |
1496 | 1526 |
1497 current_wm_move_loop_change_ = change_id; | 1527 current_wm_move_loop_change_ = change_id; |
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1871 return ScheduleInFlightChange(base::MakeUnique<InFlightCaptureChange>( | 1901 return ScheduleInFlightChange(base::MakeUnique<InFlightCaptureChange>( |
1872 this, capture_synchronizer_.get(), window)); | 1902 this, capture_synchronizer_.get(), window)); |
1873 } | 1903 } |
1874 | 1904 |
1875 uint32_t WindowTreeClient::CreateChangeIdForFocus(WindowMus* window) { | 1905 uint32_t WindowTreeClient::CreateChangeIdForFocus(WindowMus* window) { |
1876 return ScheduleInFlightChange(base::MakeUnique<InFlightFocusChange>( | 1906 return ScheduleInFlightChange(base::MakeUnique<InFlightFocusChange>( |
1877 this, focus_synchronizer_.get(), window)); | 1907 this, focus_synchronizer_.get(), window)); |
1878 } | 1908 } |
1879 | 1909 |
1880 } // namespace aura | 1910 } // namespace aura |
OLD | NEW |