OLD | NEW |
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 <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
(...skipping 28 matching lines...) Expand all Loading... |
39 CHANGE_TYPE_PROPERTY_CHANGED, | 39 CHANGE_TYPE_PROPERTY_CHANGED, |
40 CHANGE_TYPE_FOCUSED, | 40 CHANGE_TYPE_FOCUSED, |
41 CHANGE_TYPE_CURSOR_CHANGED, | 41 CHANGE_TYPE_CURSOR_CHANGED, |
42 CHANGE_TYPE_ON_CHANGE_COMPLETED, | 42 CHANGE_TYPE_ON_CHANGE_COMPLETED, |
43 CHANGE_TYPE_ON_TOP_LEVEL_CREATED, | 43 CHANGE_TYPE_ON_TOP_LEVEL_CREATED, |
44 }; | 44 }; |
45 | 45 |
46 // TODO(sky): consider nuking and converting directly to WindowData. | 46 // TODO(sky): consider nuking and converting directly to WindowData. |
47 struct TestWindow { | 47 struct TestWindow { |
48 TestWindow(); | 48 TestWindow(); |
| 49 TestWindow(const TestWindow& other); |
49 ~TestWindow(); | 50 ~TestWindow(); |
50 | 51 |
51 // Returns a string description of this. | 52 // Returns a string description of this. |
52 std::string ToString() const; | 53 std::string ToString() const; |
53 | 54 |
54 // Returns a string description that includes visible and drawn. | 55 // Returns a string description that includes visible and drawn. |
55 std::string ToString2() const; | 56 std::string ToString2() const; |
56 | 57 |
57 Id parent_id; | 58 Id parent_id; |
58 Id window_id; | 59 Id window_id; |
59 bool visible; | 60 bool visible; |
60 bool drawn; | 61 bool drawn; |
61 std::map<std::string, std::vector<uint8_t>> properties; | 62 std::map<std::string, std::vector<uint8_t>> properties; |
62 }; | 63 }; |
63 | 64 |
64 // Tracks a call to WindowTreeClient. See the individual functions for the | 65 // Tracks a call to WindowTreeClient. See the individual functions for the |
65 // fields that are used. | 66 // fields that are used. |
66 struct Change { | 67 struct Change { |
67 Change(); | 68 Change(); |
| 69 Change(const Change& other); |
68 ~Change(); | 70 ~Change(); |
69 | 71 |
70 ChangeType type; | 72 ChangeType type; |
71 ConnectionSpecificId connection_id; | 73 ConnectionSpecificId connection_id; |
72 std::vector<TestWindow> windows; | 74 std::vector<TestWindow> windows; |
73 Id window_id; | 75 Id window_id; |
74 Id window_id2; | 76 Id window_id2; |
75 Id window_id3; | 77 Id window_id3; |
76 mojo::Rect bounds; | 78 mojo::Rect bounds; |
77 mojo::Rect bounds2; | 79 mojo::Rect bounds2; |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 std::vector<Change> changes_; | 167 std::vector<Change> changes_; |
166 | 168 |
167 DISALLOW_COPY_AND_ASSIGN(TestChangeTracker); | 169 DISALLOW_COPY_AND_ASSIGN(TestChangeTracker); |
168 }; | 170 }; |
169 | 171 |
170 } // namespace ws | 172 } // namespace ws |
171 | 173 |
172 } // namespace mus | 174 } // namespace mus |
173 | 175 |
174 #endif // COMPONENTS_MUS_WS_TEST_CHANGE_TRACKER_H_ | 176 #endif // COMPONENTS_MUS_WS_TEST_CHANGE_TRACKER_H_ |
OLD | NEW |