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

Unified Diff: components/mus/ws/server_window.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/server_window.h ('k') | components/mus/ws/server_window_observer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/mus/ws/server_window.cc
diff --git a/components/mus/ws/server_window.cc b/components/mus/ws/server_window.cc
index 29b8ec14f1fada223e89bb103baca53ffffd9e49..d7f579f7dc8a0ae367692ac6073a6801e8b5da1a 100644
--- a/components/mus/ws/server_window.cc
+++ b/components/mus/ws/server_window.cc
@@ -29,6 +29,7 @@ ServerWindow::ServerWindow(ServerWindowDelegate* delegate,
stacking_target_(nullptr),
transient_parent_(nullptr),
visible_(false),
+ cursor_id_(mojom::CURSOR_NULL),
opacity_(1),
can_focus_(true),
properties_(properties),
@@ -261,6 +262,15 @@ void ServerWindow::SetOpacity(float value) {
delegate_->OnScheduleWindowPaint(this);
}
+void ServerWindow::SetPredefinedCursor(mus::mojom::Cursor value) {
+ if (value == cursor_id_)
+ return;
+ cursor_id_ = value;
+ FOR_EACH_OBSERVER(
+ ServerWindowObserver, observers_,
+ OnWindowPredefinedCursorChanged(this, static_cast<int32_t>(value)));
+}
+
void ServerWindow::SetTransform(const gfx::Transform& transform) {
if (transform_ == transform)
return;
« no previous file with comments | « components/mus/ws/server_window.h ('k') | components/mus/ws/server_window_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698