Chromium Code Reviews| 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 d6017c86beb3a14b41416e526803b6df503776bc..0401a104d8fe07acba33157b75fa745d1f293e1d 100644 |
| --- a/components/mus/public/cpp/lib/in_flight_change.cc |
| +++ b/components/mus/public/cpp/lib/in_flight_change.cc |
| @@ -85,4 +85,30 @@ 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() {} |
| + |
| +bool InFlightPredefinedCursorChange::Matches( |
| + const InFlightChange& change) const { |
| + return static_cast<const InFlightPredefinedCursorChange&>(change) |
|
sky
2015/12/02 21:42:35
You shouldn't need to override Matches. The reason
|
| + .revert_cursor_ == revert_cursor_; |
| +} |
| + |
| +void InFlightPredefinedCursorChange::SetRevertValueFrom( |
| + const InFlightChange& change) { |
| + revert_cursor_ = |
| + static_cast<const InFlightPredefinedCursorChange&>(change).revert_cursor_; |
| +} |
| + |
| +void InFlightPredefinedCursorChange::Revert() { |
| + WindowPrivate(window()).LocalSetPredefinedCursor(revert_cursor_); |
| +} |
| + |
| } // namespace mus |