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

Unified Diff: ash/mus/bridge/shell_port_mash.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: ash/mus/bridge/shell_port_mash.cc
diff --git a/ash/mus/bridge/shell_port_mash.cc b/ash/mus/bridge/shell_port_mash.cc
index da1cd5187ca2e7a5a530b1434c3e237964c364c8..9b922f34c8b1e3e36567c9102e3469c6988c1880 100644
--- a/ash/mus/bridge/shell_port_mash.cc
+++ b/ash/mus/bridge/shell_port_mash.cc
@@ -273,13 +273,25 @@ void ShellPortMash::SetDisplayWorkAreaInsets(WmWindow* window,
}
void ShellPortMash::LockCursor() {
- // TODO: http://crbug.com/637853
- NOTIMPLEMENTED();
+ window_manager_->window_manager_client()->LockCursor();
}
void ShellPortMash::UnlockCursor() {
- // TODO: http://crbug.com/637853
- NOTIMPLEMENTED();
+ window_manager_->window_manager_client()->UnlockCursor();
+}
+
+void ShellPortMash::ShowCursor() {
+ window_manager_->window_manager_client()->SetCursorVisible(true);
+}
+
+void ShellPortMash::HideCursor() {
+ window_manager_->window_manager_client()->SetCursorVisible(false);
+}
+
+void ShellPortMash::SetGlobalOverrideCursor(
+ base::Optional<ui::CursorData> cursor) {
+ window_manager_->window_manager_client()->SetGlobalOverrideCursor(
+ std::move(cursor));
}
bool ShellPortMash::IsMouseEventsEnabled() {

Powered by Google App Engine
This is Rietveld 408576698