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

Unified Diff: components/mus/public/cpp/lib/in_flight_change.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/public/cpp/lib/in_flight_change.h ('k') | components/mus/public/cpp/lib/window.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/mus/public/cpp/lib/in_flight_change.cc
diff --git a/components/mus/public/cpp/lib/in_flight_change.cc b/components/mus/public/cpp/lib/in_flight_change.cc
index 002ee3f30678af18e5be6004c0d932428172c2ed..ce9e396402279c4a5c0f0d56364b2122bd0cbca5 100644
--- a/components/mus/public/cpp/lib/in_flight_change.cc
+++ b/components/mus/public/cpp/lib/in_flight_change.cc
@@ -85,6 +85,26 @@ void InFlightPropertyChange::Revert() {
.LocalSetSharedProperty(property_name_, revert_value_.Pass());
}
+// InFlightPredefinedCursorChange ---------------------------------------------
+
+InFlightPredefinedCursorChange::InFlightPredefinedCursorChange(
+ Window* window,
+ mojom::Cursor revert_value)
+ : InFlightChange(window, ChangeType::PREDEFINED_CURSOR),
+ revert_cursor_(revert_value) {}
+
+InFlightPredefinedCursorChange::~InFlightPredefinedCursorChange() {}
+
+void InFlightPredefinedCursorChange::SetRevertValueFrom(
+ const InFlightChange& change) {
+ revert_cursor_ =
+ static_cast<const InFlightPredefinedCursorChange&>(change).revert_cursor_;
+}
+
+void InFlightPredefinedCursorChange::Revert() {
+ WindowPrivate(window()).LocalSetPredefinedCursor(revert_cursor_);
+}
+
// InFlightVisibleChange -------------------------------------------------------
InFlightVisibleChange::InFlightVisibleChange(Window* window,
« no previous file with comments | « components/mus/public/cpp/lib/in_flight_change.h ('k') | components/mus/public/cpp/lib/window.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698