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 1817 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1828 void WindowTreeClient::SetExtendedHitArea(Window* window, | 1828 void WindowTreeClient::SetExtendedHitArea(Window* window, |
1829 const gfx::Insets& hit_area) { | 1829 const gfx::Insets& hit_area) { |
1830 if (window_manager_client_) { | 1830 if (window_manager_client_) { |
1831 float device_scale_factor = ScaleFactorForDisplay(window); | 1831 float device_scale_factor = ScaleFactorForDisplay(window); |
1832 window_manager_client_->SetExtendedHitArea( | 1832 window_manager_client_->SetExtendedHitArea( |
1833 WindowMus::Get(window)->server_id(), | 1833 WindowMus::Get(window)->server_id(), |
1834 gfx::ConvertInsetsToPixel(device_scale_factor, hit_area)); | 1834 gfx::ConvertInsetsToPixel(device_scale_factor, hit_area)); |
1835 } | 1835 } |
1836 } | 1836 } |
1837 | 1837 |
| 1838 void WindowTreeClient::LockCursor() { |
| 1839 if (window_manager_client_) |
| 1840 window_manager_client_->WmLockCursor(); |
| 1841 } |
| 1842 |
| 1843 void WindowTreeClient::UnlockCursor() { |
| 1844 if (window_manager_client_) |
| 1845 window_manager_client_->WmUnlockCursor(); |
| 1846 } |
| 1847 |
| 1848 void WindowTreeClient::ShowCursor() { |
| 1849 if (window_manager_client_) |
| 1850 window_manager_client_->WmShowCursor(); |
| 1851 } |
| 1852 |
| 1853 void WindowTreeClient::HideCursor() { |
| 1854 if (window_manager_client_) |
| 1855 window_manager_client_->WmHideCursor(); |
| 1856 } |
| 1857 |
| 1858 void WindowTreeClient::SetGlobalOverrideCursor( |
| 1859 base::Optional<ui::CursorData> cursor) { |
| 1860 if (window_manager_client_) |
| 1861 window_manager_client_->WmSetGlobalOverrideCursor(std::move(cursor)); |
| 1862 } |
| 1863 |
1838 void WindowTreeClient::RequestClose(Window* window) { | 1864 void WindowTreeClient::RequestClose(Window* window) { |
1839 DCHECK(window); | 1865 DCHECK(window); |
1840 if (window_manager_client_) | 1866 if (window_manager_client_) |
1841 window_manager_client_->WmRequestClose(WindowMus::Get(window)->server_id()); | 1867 window_manager_client_->WmRequestClose(WindowMus::Get(window)->server_id()); |
1842 } | 1868 } |
1843 | 1869 |
1844 void WindowTreeClient::OnWindowTreeHostBoundsWillChange( | 1870 void WindowTreeClient::OnWindowTreeHostBoundsWillChange( |
1845 WindowTreeHostMus* window_tree_host, | 1871 WindowTreeHostMus* window_tree_host, |
1846 const gfx::Rect& bounds) { | 1872 const gfx::Rect& bounds) { |
1847 ScheduleInFlightBoundsChange(WindowMus::Get(window_tree_host->window()), | 1873 ScheduleInFlightBoundsChange(WindowMus::Get(window_tree_host->window()), |
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2076 } | 2102 } |
2077 | 2103 |
2078 void WindowTreeClient::OnCompositingLockStateChanged( | 2104 void WindowTreeClient::OnCompositingLockStateChanged( |
2079 ui::Compositor* compositor) {} | 2105 ui::Compositor* compositor) {} |
2080 | 2106 |
2081 void WindowTreeClient::OnCompositingShuttingDown(ui::Compositor* compositor) { | 2107 void WindowTreeClient::OnCompositingShuttingDown(ui::Compositor* compositor) { |
2082 compositor->RemoveObserver(this); | 2108 compositor->RemoveObserver(this); |
2083 } | 2109 } |
2084 | 2110 |
2085 } // namespace aura | 2111 } // namespace aura |
OLD | NEW |