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

Side by Side Diff: ui/aura/mus/in_flight_change.cc

Issue 2830703003: [views-mus] Support custom cursors. (Closed)
Patch Set: fix cast_shell_linux Created 3 years, 7 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 unified diff | Download patch
« no previous file with comments | « ui/aura/mus/in_flight_change.h ('k') | ui/aura/mus/window_manager_delegate.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/aura/mus/in_flight_change.h" 5 #include "ui/aura/mus/in_flight_change.h"
6 6
7 #include "ui/aura/client/aura_constants.h" 7 #include "ui/aura/client/aura_constants.h"
8 #include "ui/aura/mus/capture_synchronizer.h" 8 #include "ui/aura/mus/capture_synchronizer.h"
9 #include "ui/aura/mus/focus_synchronizer.h" 9 #include "ui/aura/mus/focus_synchronizer.h"
10 #include "ui/aura/mus/window_mus.h" 10 #include "ui/aura/mus/window_mus.h"
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 base::MakeUnique<std::vector<uint8_t>>(*property_change.revert_value_); 174 base::MakeUnique<std::vector<uint8_t>>(*property_change.revert_value_);
175 } else { 175 } else {
176 revert_value_.reset(); 176 revert_value_.reset();
177 } 177 }
178 } 178 }
179 179
180 void InFlightPropertyChange::Revert() { 180 void InFlightPropertyChange::Revert() {
181 window()->SetPropertyFromServer(property_name_, revert_value_.get()); 181 window()->SetPropertyFromServer(property_name_, revert_value_.get());
182 } 182 }
183 183
184 // InFlightPredefinedCursorChange --------------------------------------------- 184 // InFlightCursorChange ----------------------------------------------------
185 185
186 InFlightPredefinedCursorChange::InFlightPredefinedCursorChange( 186 InFlightCursorChange::InFlightCursorChange(WindowMus* window,
187 WindowMus* window, 187 const ui::CursorData& revert_value)
188 ui::mojom::CursorType revert_value) 188 : InFlightChange(window, ChangeType::CURSOR),
189 : InFlightChange(window, ChangeType::PREDEFINED_CURSOR),
190 revert_cursor_(revert_value) {} 189 revert_cursor_(revert_value) {}
191 190
192 InFlightPredefinedCursorChange::~InFlightPredefinedCursorChange() {} 191 InFlightCursorChange::~InFlightCursorChange() {}
193 192
194 void InFlightPredefinedCursorChange::SetRevertValueFrom( 193 void InFlightCursorChange::SetRevertValueFrom(const InFlightChange& change) {
195 const InFlightChange& change) {
196 revert_cursor_ = 194 revert_cursor_ =
197 static_cast<const InFlightPredefinedCursorChange&>(change).revert_cursor_; 195 static_cast<const InFlightCursorChange&>(change).revert_cursor_;
198 } 196 }
199 197
200 void InFlightPredefinedCursorChange::Revert() { 198 void InFlightCursorChange::Revert() {
201 window()->SetPredefinedCursorFromServer(revert_cursor_); 199 window()->SetCursorFromServer(revert_cursor_);
202 } 200 }
203 201
204 // InFlightVisibleChange ------------------------------------------------------- 202 // InFlightVisibleChange -------------------------------------------------------
205 203
206 InFlightVisibleChange::InFlightVisibleChange(WindowTreeClient* client, 204 InFlightVisibleChange::InFlightVisibleChange(WindowTreeClient* client,
207 WindowMus* window, 205 WindowMus* window,
208 bool revert_value) 206 bool revert_value)
209 : InFlightChange(window, ChangeType::VISIBLE), 207 : InFlightChange(window, ChangeType::VISIBLE),
210 window_tree_client_(client), 208 window_tree_client_(client),
211 revert_visible_(revert_value) {} 209 revert_visible_(revert_value) {}
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 const InFlightChange& change) { 252 const InFlightChange& change) {
255 revert_modal_type_ = 253 revert_modal_type_ =
256 static_cast<const InFlightSetModalTypeChange&>(change).revert_modal_type_; 254 static_cast<const InFlightSetModalTypeChange&>(change).revert_modal_type_;
257 } 255 }
258 256
259 void InFlightSetModalTypeChange::Revert() { 257 void InFlightSetModalTypeChange::Revert() {
260 window()->GetWindow()->SetProperty(client::kModalKey, revert_modal_type_); 258 window()->GetWindow()->SetProperty(client::kModalKey, revert_modal_type_);
261 } 259 }
262 260
263 } // namespace aura 261 } // namespace aura
OLDNEW
« no previous file with comments | « ui/aura/mus/in_flight_change.h ('k') | ui/aura/mus/window_manager_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698