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

Unified Diff: ui/aura/mus/window_port_mus.cc

Issue 2830703003: [views-mus] Support custom cursors. (Closed)
Patch Set: fix cast_shell_linux Created 3 years, 8 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
« no previous file with comments | « ui/aura/mus/window_port_mus.h ('k') | ui/aura/mus/window_tree_client.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/mus/window_port_mus.cc
diff --git a/ui/aura/mus/window_port_mus.cc b/ui/aura/mus/window_port_mus.cc
index d5cec7110aedeb1342bde19e1f148313295baf0d..4c605a06f0416bb5186802a7eaa19792e05256e0 100644
--- a/ui/aura/mus/window_port_mus.cc
+++ b/ui/aura/mus/window_port_mus.cc
@@ -69,12 +69,12 @@ void WindowPortMus::SetImeVisibility(bool visible,
window_tree_client_->SetImeVisibility(this, visible, std::move(state));
}
-void WindowPortMus::SetPredefinedCursor(ui::mojom::CursorType cursor_id) {
- if (cursor_id == predefined_cursor_)
+void WindowPortMus::SetCursor(const ui::CursorData& cursor) {
+ if (cursor_.IsSameAs(cursor))
return;
- window_tree_client_->SetPredefinedCursor(this, predefined_cursor_, cursor_id);
- predefined_cursor_ = cursor_id;
+ window_tree_client_->SetCursor(this, cursor_, cursor);
+ cursor_ = cursor;
}
void WindowPortMus::SetEventTargetingPolicy(
@@ -270,11 +270,10 @@ void WindowPortMus::SetOpacityFromServer(float opacity) {
window_->layer()->SetOpacity(opacity);
}
-void WindowPortMus::SetPredefinedCursorFromServer(
- ui::mojom::CursorType cursor) {
+void WindowPortMus::SetCursorFromServer(const ui::CursorData& cursor) {
// As this does nothing more than set the cursor we don't need to use
// ServerChange.
- predefined_cursor_ = cursor;
+ cursor_ = cursor;
}
void WindowPortMus::SetPropertyFromServer(
« no previous file with comments | « ui/aura/mus/window_port_mus.h ('k') | ui/aura/mus/window_tree_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698