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::SetCursorVisible(bool visible) { |
| 1849 if (window_manager_client_) |
| 1850 window_manager_client_->WmSetCursorVisible(visible); |
| 1851 } |
| 1852 |
| 1853 void WindowTreeClient::SetGlobalOverrideCursor( |
| 1854 base::Optional<ui::CursorData> cursor) { |
| 1855 if (window_manager_client_) |
| 1856 window_manager_client_->WmSetGlobalOverrideCursor(std::move(cursor)); |
| 1857 } |
| 1858 |
1838 void WindowTreeClient::RequestClose(Window* window) { | 1859 void WindowTreeClient::RequestClose(Window* window) { |
1839 DCHECK(window); | 1860 DCHECK(window); |
1840 if (window_manager_client_) | 1861 if (window_manager_client_) |
1841 window_manager_client_->WmRequestClose(WindowMus::Get(window)->server_id()); | 1862 window_manager_client_->WmRequestClose(WindowMus::Get(window)->server_id()); |
1842 } | 1863 } |
1843 | 1864 |
1844 void WindowTreeClient::OnWindowTreeHostBoundsWillChange( | 1865 void WindowTreeClient::OnWindowTreeHostBoundsWillChange( |
1845 WindowTreeHostMus* window_tree_host, | 1866 WindowTreeHostMus* window_tree_host, |
1846 const gfx::Rect& bounds) { | 1867 const gfx::Rect& bounds) { |
1847 ScheduleInFlightBoundsChange(WindowMus::Get(window_tree_host->window()), | 1868 ScheduleInFlightBoundsChange(WindowMus::Get(window_tree_host->window()), |
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2076 } | 2097 } |
2077 | 2098 |
2078 void WindowTreeClient::OnCompositingLockStateChanged( | 2099 void WindowTreeClient::OnCompositingLockStateChanged( |
2079 ui::Compositor* compositor) {} | 2100 ui::Compositor* compositor) {} |
2080 | 2101 |
2081 void WindowTreeClient::OnCompositingShuttingDown(ui::Compositor* compositor) { | 2102 void WindowTreeClient::OnCompositingShuttingDown(ui::Compositor* compositor) { |
2082 compositor->RemoveObserver(this); | 2103 compositor->RemoveObserver(this); |
2083 } | 2104 } |
2084 | 2105 |
2085 } // namespace aura | 2106 } // namespace aura |
OLD | NEW |