OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/events/mojo/event_struct_traits.h" | 5 #include "ui/events/mojo/event_struct_traits.h" |
6 | 6 |
7 #include "ui/events/event.h" | 7 #include "ui/events/event.h" |
8 #include "ui/events/event_utils.h" | 8 #include "ui/events/event_utils.h" |
9 #include "ui/events/keycodes/dom/keycode_converter.h" | 9 #include "ui/events/keycodes/dom/keycode_converter.h" |
10 #include "ui/events/mojo/event_constants.mojom.h" | 10 #include "ui/events/mojo/event_constants.mojom.h" |
11 #include "ui/events/mojo/latency_info_struct_traits.h" | 11 #include "ui/latency/mojo/latency_info_struct_traits.h" |
12 | 12 |
13 namespace mojo { | 13 namespace mojo { |
14 namespace { | 14 namespace { |
15 | 15 |
16 ui::mojom::EventType UIEventTypeToMojo(ui::EventType type) { | 16 ui::mojom::EventType UIEventTypeToMojo(ui::EventType type) { |
17 switch (type) { | 17 switch (type) { |
18 case ui::ET_POINTER_DOWN: | 18 case ui::ET_POINTER_DOWN: |
19 return ui::mojom::EventType::POINTER_DOWN; | 19 return ui::mojom::EventType::POINTER_DOWN; |
20 | 20 |
21 case ui::ET_POINTER_MOVED: | 21 case ui::ET_POINTER_MOVED: |
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
326 return false; | 326 return false; |
327 } | 327 } |
328 | 328 |
329 if (!out->get()) | 329 if (!out->get()) |
330 return false; | 330 return false; |
331 | 331 |
332 return event.ReadLatency((*out)->latency()); | 332 return event.ReadLatency((*out)->latency()); |
333 } | 333 } |
334 | 334 |
335 } // namespace mojo | 335 } // namespace mojo |
OLD | NEW |