Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1219)

Unified Diff: services/ui/ws/window_tree.cc

Issue 2857963003: Add {Lock,Unlock,Show,Hide}Cursor() to the window manager mojom. (Closed)
Patch Set: early return -> braces and comment Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: services/ui/ws/window_tree.cc
diff --git a/services/ui/ws/window_tree.cc b/services/ui/ws/window_tree.cc
index 511a495c93d9e1159234e74f0a1f06b2825c9de6..d88c615f65df061f250faa63270b8f8173504f35 100644
--- a/services/ui/ws/window_tree.cc
+++ b/services/ui/ws/window_tree.cc
@@ -2307,6 +2307,27 @@ void WindowTree::WmSetNonClientCursor(uint32_t window_id,
window->SetNonClientCursor(std::move(cursor));
}
+void WindowTree::WmLockCursor() {
+ DCHECK(window_manager_state_);
+ window_manager_state_->cursor_state().LockCursor();
+}
+
+void WindowTree::WmUnlockCursor() {
+ DCHECK(window_manager_state_);
+ window_manager_state_->cursor_state().UnlockCursor();
+}
+
+void WindowTree::WmSetCursorVisible(bool visible) {
+ DCHECK(window_manager_state_);
+ window_manager_state_->cursor_state().SetCursorVisible(visible);
+}
+
+void WindowTree::WmSetGlobalOverrideCursor(
+ base::Optional<ui::CursorData> cursor) {
+ DCHECK(window_manager_state_);
+ window_manager_state_->cursor_state().SetGlobalOverrideCursor(cursor);
+}
+
void WindowTree::OnWmCreatedTopLevelWindow(uint32_t change_id,
Id transport_window_id) {
ServerWindow* window =

Powered by Google App Engine
This is Rietveld 408576698