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

Side by Side Diff: components/mus/ws/test_change_tracker.h

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 unified diff | Download patch
« no previous file with comments | « components/mus/ws/server_window_observer.h ('k') | components/mus/ws/test_change_tracker.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 COMPONENTS_MUS_WS_TEST_CHANGE_TRACKER_H_ 5 #ifndef COMPONENTS_MUS_WS_TEST_CHANGE_TRACKER_H_
6 #define COMPONENTS_MUS_WS_TEST_CHANGE_TRACKER_H_ 6 #define COMPONENTS_MUS_WS_TEST_CHANGE_TRACKER_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 18 matching lines...) Expand all
29 CHANGE_TYPE_NODE_HIERARCHY_CHANGED, 29 CHANGE_TYPE_NODE_HIERARCHY_CHANGED,
30 CHANGE_TYPE_NODE_REMOVE_TRANSIENT_WINDOW_FROM_PARENT, 30 CHANGE_TYPE_NODE_REMOVE_TRANSIENT_WINDOW_FROM_PARENT,
31 CHANGE_TYPE_NODE_REORDERED, 31 CHANGE_TYPE_NODE_REORDERED,
32 CHANGE_TYPE_NODE_VISIBILITY_CHANGED, 32 CHANGE_TYPE_NODE_VISIBILITY_CHANGED,
33 CHANGE_TYPE_NODE_DRAWN_STATE_CHANGED, 33 CHANGE_TYPE_NODE_DRAWN_STATE_CHANGED,
34 CHANGE_TYPE_NODE_DELETED, 34 CHANGE_TYPE_NODE_DELETED,
35 CHANGE_TYPE_INPUT_EVENT, 35 CHANGE_TYPE_INPUT_EVENT,
36 CHANGE_TYPE_PROPERTY_CHANGED, 36 CHANGE_TYPE_PROPERTY_CHANGED,
37 CHANGE_TYPE_DELEGATE_EMBED, 37 CHANGE_TYPE_DELEGATE_EMBED,
38 CHANGE_TYPE_FOCUSED, 38 CHANGE_TYPE_FOCUSED,
39 CHANGE_TYPE_CURSOR_CHANGED
39 }; 40 };
40 41
41 // TODO(sky): consider nuking and converting directly to WindowData. 42 // TODO(sky): consider nuking and converting directly to WindowData.
42 struct TestWindow { 43 struct TestWindow {
43 TestWindow(); 44 TestWindow();
44 ~TestWindow(); 45 ~TestWindow();
45 46
46 // Returns a string description of this. 47 // Returns a string description of this.
47 std::string ToString() const; 48 std::string ToString() const;
48 49
(...skipping 20 matching lines...) Expand all
69 Id window_id2; 70 Id window_id2;
70 Id window_id3; 71 Id window_id3;
71 mojo::Rect bounds; 72 mojo::Rect bounds;
72 mojo::Rect bounds2; 73 mojo::Rect bounds2;
73 int32_t event_action; 74 int32_t event_action;
74 mojo::String embed_url; 75 mojo::String embed_url;
75 mojom::OrderDirection direction; 76 mojom::OrderDirection direction;
76 bool bool_value; 77 bool bool_value;
77 std::string property_key; 78 std::string property_key;
78 std::string property_value; 79 std::string property_value;
80 int32_t cursor_id;
79 }; 81 };
80 82
81 // Converts Changes to string descriptions. 83 // Converts Changes to string descriptions.
82 std::vector<std::string> ChangesToDescription1( 84 std::vector<std::string> ChangesToDescription1(
83 const std::vector<Change>& changes); 85 const std::vector<Change>& changes);
84 86
85 // Convenience for returning the description of the first item in |changes|. 87 // Convenience for returning the description of the first item in |changes|.
86 // Returns an empty string if |changes| has something other than one entry. 88 // Returns an empty string if |changes| has something other than one entry.
87 std::string SingleChangeToDescription(const std::vector<Change>& changes); 89 std::string SingleChangeToDescription(const std::vector<Change>& changes);
88 90
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 Id relative_window_id, 141 Id relative_window_id,
140 mojom::OrderDirection direction); 142 mojom::OrderDirection direction);
141 void OnWindowDeleted(Id window_id); 143 void OnWindowDeleted(Id window_id);
142 void OnWindowVisibilityChanged(Id window_id, bool visible); 144 void OnWindowVisibilityChanged(Id window_id, bool visible);
143 void OnWindowDrawnStateChanged(Id window_id, bool drawn); 145 void OnWindowDrawnStateChanged(Id window_id, bool drawn);
144 void OnWindowInputEvent(Id window_id, mojom::EventPtr event); 146 void OnWindowInputEvent(Id window_id, mojom::EventPtr event);
145 void OnWindowSharedPropertyChanged(Id window_id, 147 void OnWindowSharedPropertyChanged(Id window_id,
146 mojo::String name, 148 mojo::String name,
147 mojo::Array<uint8_t> data); 149 mojo::Array<uint8_t> data);
148 void OnWindowFocused(Id window_id); 150 void OnWindowFocused(Id window_id);
151 void OnWindowPredefinedCursorChanged(Id window_id, mojom::Cursor cursor_id);
149 void DelegateEmbed(const mojo::String& url); 152 void DelegateEmbed(const mojo::String& url);
150 153
151 private: 154 private:
152 void AddChange(const Change& change); 155 void AddChange(const Change& change);
153 156
154 Delegate* delegate_; 157 Delegate* delegate_;
155 std::vector<Change> changes_; 158 std::vector<Change> changes_;
156 159
157 DISALLOW_COPY_AND_ASSIGN(TestChangeTracker); 160 DISALLOW_COPY_AND_ASSIGN(TestChangeTracker);
158 }; 161 };
159 162
160 } // namespace ws 163 } // namespace ws
161 164
162 } // namespace mus 165 } // namespace mus
163 166
164 #endif // COMPONENTS_MUS_WS_TEST_CHANGE_TRACKER_H_ 167 #endif // COMPONENTS_MUS_WS_TEST_CHANGE_TRACKER_H_
OLDNEW
« no previous file with comments | « components/mus/ws/server_window_observer.h ('k') | components/mus/ws/test_change_tracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698