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 SERVICES_UI_WS_TEST_CHANGE_TRACKER_H_ | 5 #ifndef SERVICES_UI_WS_TEST_CHANGE_TRACKER_H_ |
6 #define SERVICES_UI_WS_TEST_CHANGE_TRACKER_H_ | 6 #define SERVICES_UI_WS_TEST_CHANGE_TRACKER_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
| 11 #include <unordered_map> |
11 #include <vector> | 12 #include <vector> |
12 | 13 |
13 #include "base/macros.h" | 14 #include "base/macros.h" |
14 #include "services/ui/common/types.h" | 15 #include "services/ui/common/types.h" |
15 #include "services/ui/public/interfaces/window_tree.mojom.h" | 16 #include "services/ui/public/interfaces/window_tree.mojom.h" |
16 #include "ui/gfx/geometry/mojo/geometry.mojom.h" | 17 #include "ui/gfx/geometry/mojo/geometry.mojom.h" |
17 | 18 |
18 namespace ui { | 19 namespace ui { |
19 | 20 |
20 namespace ws { | 21 namespace ws { |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 mojom::OrderDirection direction; | 85 mojom::OrderDirection direction; |
85 bool bool_value; | 86 bool bool_value; |
86 float float_value; | 87 float float_value; |
87 std::string property_key; | 88 std::string property_key; |
88 std::string property_value; | 89 std::string property_value; |
89 int32_t cursor_id; | 90 int32_t cursor_id; |
90 uint32_t change_id; | 91 uint32_t change_id; |
91 cc::SurfaceId surface_id; | 92 cc::SurfaceId surface_id; |
92 gfx::Size frame_size; | 93 gfx::Size frame_size; |
93 float device_scale_factor; | 94 float device_scale_factor; |
| 95 // Set in OnWindowInputEvent() if the event is a KeyEvent. |
| 96 std::unordered_map<std::string, std::vector<uint8_t>> key_event_properties; |
94 }; | 97 }; |
95 | 98 |
96 // Converts Changes to string descriptions. | 99 // Converts Changes to string descriptions. |
97 std::vector<std::string> ChangesToDescription1( | 100 std::vector<std::string> ChangesToDescription1( |
98 const std::vector<Change>& changes); | 101 const std::vector<Change>& changes); |
99 | 102 |
100 // Convenience for returning the description of the first item in |changes|. | 103 // Convenience for returning the description of the first item in |changes|. |
101 // Returns an empty string if |changes| has something other than one entry. | 104 // Returns an empty string if |changes| has something other than one entry. |
102 std::string SingleChangeToDescription(const std::vector<Change>& changes); | 105 std::string SingleChangeToDescription(const std::vector<Change>& changes); |
103 std::string SingleChangeToDescription2(const std::vector<Change>& changes); | 106 std::string SingleChangeToDescription2(const std::vector<Change>& changes); |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 std::vector<Change> changes_; | 189 std::vector<Change> changes_; |
187 | 190 |
188 DISALLOW_COPY_AND_ASSIGN(TestChangeTracker); | 191 DISALLOW_COPY_AND_ASSIGN(TestChangeTracker); |
189 }; | 192 }; |
190 | 193 |
191 } // namespace ws | 194 } // namespace ws |
192 | 195 |
193 } // namespace ui | 196 } // namespace ui |
194 | 197 |
195 #endif // SERVICES_UI_WS_TEST_CHANGE_TRACKER_H_ | 198 #endif // SERVICES_UI_WS_TEST_CHANGE_TRACKER_H_ |
OLD | NEW |