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

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

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 | « services/ui/ws/window_tree_unittest.cc ('k') | ui/aura/mus/in_flight_change.cc » ('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 #ifndef UI_AURA_MUS_IN_FLIGHT_CHANGE_H_ 5 #ifndef UI_AURA_MUS_IN_FLIGHT_CHANGE_H_
6 #define UI_AURA_MUS_IN_FLIGHT_CHANGE_H_ 6 #define UI_AURA_MUS_IN_FLIGHT_CHANGE_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
11 #include <string> 11 #include <string>
12 #include <vector> 12 #include <vector>
13 13
14 #include "base/macros.h" 14 #include "base/macros.h"
15 #include "base/memory/ptr_util.h" 15 #include "base/memory/ptr_util.h"
16 #include "base/optional.h" 16 #include "base/optional.h"
17 #include "cc/surfaces/local_surface_id.h" 17 #include "cc/surfaces/local_surface_id.h"
18 #include "ui/aura/window_observer.h" 18 #include "ui/aura/window_observer.h"
19 #include "ui/base/cursor/cursor_data.h"
19 #include "ui/base/ui_base_types.h" 20 #include "ui/base/ui_base_types.h"
20 #include "ui/gfx/geometry/rect.h" 21 #include "ui/gfx/geometry/rect.h"
21 22
22 namespace ui { 23 namespace ui {
23 24
24 namespace mojom { 25 namespace mojom {
25 enum class CursorType : int32_t; 26 enum class CursorType : int32_t;
26 } 27 }
27 28
28 } // namespace ui 29 } // namespace ui
(...skipping 10 matching lines...) Expand all
39 ADD_TRANSIENT_WINDOW, 40 ADD_TRANSIENT_WINDOW,
40 BOUNDS, 41 BOUNDS,
41 CAPTURE, 42 CAPTURE,
42 DELETE_WINDOW, 43 DELETE_WINDOW,
43 DRAG_LOOP, 44 DRAG_LOOP,
44 FOCUS, 45 FOCUS,
45 MOVE_LOOP, 46 MOVE_LOOP,
46 NEW_TOP_LEVEL_WINDOW, 47 NEW_TOP_LEVEL_WINDOW,
47 NEW_WINDOW, 48 NEW_WINDOW,
48 OPACITY, 49 OPACITY,
49 PREDEFINED_CURSOR, 50 CURSOR,
50 PROPERTY, 51 PROPERTY,
51 REMOVE_CHILD, 52 REMOVE_CHILD,
52 REMOVE_TRANSIENT_WINDOW_FROM_PARENT, 53 REMOVE_TRANSIENT_WINDOW_FROM_PARENT,
53 REORDER, 54 REORDER,
54 SET_MODAL, 55 SET_MODAL,
55 VISIBLE, 56 VISIBLE,
56 }; 57 };
57 58
58 // InFlightChange is used to track function calls to the server and take the 59 // InFlightChange is used to track function calls to the server and take the
59 // appropriate action when the call fails, or the same property changes while 60 // appropriate action when the call fails, or the same property changes while
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 void SetRevertValueFrom(const InFlightChange& change) override; 265 void SetRevertValueFrom(const InFlightChange& change) override;
265 void Revert() override; 266 void Revert() override;
266 267
267 private: 268 private:
268 const std::string property_name_; 269 const std::string property_name_;
269 std::unique_ptr<std::vector<uint8_t>> revert_value_; 270 std::unique_ptr<std::vector<uint8_t>> revert_value_;
270 271
271 DISALLOW_COPY_AND_ASSIGN(InFlightPropertyChange); 272 DISALLOW_COPY_AND_ASSIGN(InFlightPropertyChange);
272 }; 273 };
273 274
274 class InFlightPredefinedCursorChange : public InFlightChange { 275 class InFlightCursorChange : public InFlightChange {
275 public: 276 public:
276 InFlightPredefinedCursorChange(WindowMus* window, 277 InFlightCursorChange(WindowMus* window, const ui::CursorData& revert_value);
277 ui::mojom::CursorType revert_value); 278 ~InFlightCursorChange() override;
278 ~InFlightPredefinedCursorChange() override;
279 279
280 // InFlightChange: 280 // InFlightChange:
281 void SetRevertValueFrom(const InFlightChange& change) override; 281 void SetRevertValueFrom(const InFlightChange& change) override;
282 void Revert() override; 282 void Revert() override;
283 283
284 private: 284 private:
285 ui::mojom::CursorType revert_cursor_; 285 ui::CursorData revert_cursor_;
286 286
287 DISALLOW_COPY_AND_ASSIGN(InFlightPredefinedCursorChange); 287 DISALLOW_COPY_AND_ASSIGN(InFlightCursorChange);
288 }; 288 };
289 289
290 class InFlightVisibleChange : public InFlightChange { 290 class InFlightVisibleChange : public InFlightChange {
291 public: 291 public:
292 InFlightVisibleChange(WindowTreeClient* client, 292 InFlightVisibleChange(WindowTreeClient* client,
293 WindowMus* window, 293 WindowMus* window,
294 const bool revert_value); 294 const bool revert_value);
295 ~InFlightVisibleChange() override; 295 ~InFlightVisibleChange() override;
296 296
297 // InFlightChange: 297 // InFlightChange:
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
331 331
332 private: 332 private:
333 ui::ModalType revert_modal_type_; 333 ui::ModalType revert_modal_type_;
334 334
335 DISALLOW_COPY_AND_ASSIGN(InFlightSetModalTypeChange); 335 DISALLOW_COPY_AND_ASSIGN(InFlightSetModalTypeChange);
336 }; 336 };
337 337
338 } // namespace aura 338 } // namespace aura
339 339
340 #endif // UI_AURA_MUS_IN_FLIGHT_CHANGE_H_ 340 #endif // UI_AURA_MUS_IN_FLIGHT_CHANGE_H_
OLDNEW
« no previous file with comments | « services/ui/ws/window_tree_unittest.cc ('k') | ui/aura/mus/in_flight_change.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698