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

Unified Diff: components/mus/ws/connection_manager.cc

Issue 1465803003: mus: Let clients set the cursor of their window. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Do it the other way + explicit checks that it is a mouse pointer. Created 5 years 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
« no previous file with comments | « components/mus/ws/connection_manager.h ('k') | components/mus/ws/default_access_policy.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/mus/ws/connection_manager.cc
diff --git a/components/mus/ws/connection_manager.cc b/components/mus/ws/connection_manager.cc
index 3c8bea5c1aa646153857d713339b7c5d663dc5d5..19a91341fe94d163a56cc80048b1ec2c31aa72fd 100644
--- a/components/mus/ws/connection_manager.cc
+++ b/components/mus/ws/connection_manager.cc
@@ -338,6 +338,20 @@ void ConnectionManager::ProcessWindowDeleted(const WindowId& window) {
}
}
+void ConnectionManager::ProcessWillChangeWindowPredefinedCursor(
+ ServerWindow* window,
+ int32_t cursor_id) {
+ for (auto& pair : connection_map_) {
+ pair.second->service()->ProcessCursorChanged(window, cursor_id,
+ IsOperationSource(pair.first));
+ }
+
+ // Pass the cursor change to the native window.
+ WindowTreeHostImpl* host = GetWindowTreeHostByWindow(window);
+ if (host)
+ host->OnCursorUpdated(window);
+}
+
void ConnectionManager::ProcessViewportMetricsChanged(
const mojom::ViewportMetrics& old_metrics,
const mojom::ViewportMetrics& new_metrics) {
@@ -468,6 +482,14 @@ void ConnectionManager::OnWillChangeWindowVisibility(ServerWindow* window) {
}
}
+void ConnectionManager::OnWindowPredefinedCursorChanged(ServerWindow* window,
+ int32_t cursor_id) {
+ if (in_destructor_)
+ return;
+
+ ProcessWillChangeWindowPredefinedCursor(window, cursor_id);
+}
+
void ConnectionManager::OnWindowSharedPropertyChanged(
ServerWindow* window,
const std::string& name,
« no previous file with comments | « components/mus/ws/connection_manager.h ('k') | components/mus/ws/default_access_policy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698