OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 PPAPI_SHARED_IMPL_PPB_INPUT_EVENT_SHARED_H_ | 5 #ifndef PPAPI_SHARED_IMPL_PPB_INPUT_EVENT_SHARED_H_ |
6 #define PPAPI_SHARED_IMPL_PPB_INPUT_EVENT_SHARED_H_ | 6 #define PPAPI_SHARED_IMPL_PPB_INPUT_EVENT_SHARED_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
13 #include "ppapi/c/ppb_input_event.h" | 13 #include "ppapi/c/ppb_input_event.h" |
14 #include "ppapi/shared_impl/resource.h" | 14 #include "ppapi/shared_impl/resource.h" |
15 #include "ppapi/thunk/ppb_input_event_api.h" | 15 #include "ppapi/thunk/ppb_input_event_api.h" |
| 16 #include "ui/events/latency_info.h" |
16 | 17 |
17 namespace ppapi { | 18 namespace ppapi { |
18 | 19 |
19 // IF YOU ADD STUFF TO THIS CLASS | 20 // IF YOU ADD STUFF TO THIS CLASS |
20 // ============================== | 21 // ============================== |
21 // Be sure to add it to the STRUCT_TRAITS at the top of ppapi_messages.h | 22 // Be sure to add it to the STRUCT_TRAITS at the top of ppapi_messages.h |
22 struct PPAPI_SHARED_EXPORT InputEventData { | 23 struct PPAPI_SHARED_EXPORT InputEventData { |
23 InputEventData(); | 24 InputEventData(); |
24 ~InputEventData(); | 25 ~InputEventData(); |
25 | 26 |
(...skipping 23 matching lines...) Expand all Loading... |
49 std::string character_text; | 50 std::string character_text; |
50 | 51 |
51 std::vector<uint32_t> composition_segment_offsets; | 52 std::vector<uint32_t> composition_segment_offsets; |
52 int32_t composition_target_segment; | 53 int32_t composition_target_segment; |
53 uint32_t composition_selection_start; | 54 uint32_t composition_selection_start; |
54 uint32_t composition_selection_end; | 55 uint32_t composition_selection_end; |
55 | 56 |
56 std::vector<PP_TouchPoint> touches; | 57 std::vector<PP_TouchPoint> touches; |
57 std::vector<PP_TouchPoint> changed_touches; | 58 std::vector<PP_TouchPoint> changed_touches; |
58 std::vector<PP_TouchPoint> target_touches; | 59 std::vector<PP_TouchPoint> target_touches; |
| 60 |
| 61 ui::LatencyInfo latency_info; |
59 }; | 62 }; |
60 | 63 |
61 // This simple class implements the PPB_InputEvent_API in terms of the | 64 // This simple class implements the PPB_InputEvent_API in terms of the |
62 // shared InputEventData structure | 65 // shared InputEventData structure |
63 class PPAPI_SHARED_EXPORT PPB_InputEvent_Shared | 66 class PPAPI_SHARED_EXPORT PPB_InputEvent_Shared |
64 : public Resource, | 67 : public Resource, |
65 public thunk::PPB_InputEvent_API { | 68 public thunk::PPB_InputEvent_API { |
66 public: | 69 public: |
67 PPB_InputEvent_Shared(ResourceObjectType type, | 70 PPB_InputEvent_Shared(ResourceObjectType type, |
68 PP_Instance instance, | 71 PP_Instance instance, |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 | 145 |
143 private: | 146 private: |
144 InputEventData data_; | 147 InputEventData data_; |
145 | 148 |
146 DISALLOW_IMPLICIT_CONSTRUCTORS(PPB_InputEvent_Shared); | 149 DISALLOW_IMPLICIT_CONSTRUCTORS(PPB_InputEvent_Shared); |
147 }; | 150 }; |
148 | 151 |
149 } // namespace ppapi | 152 } // namespace ppapi |
150 | 153 |
151 #endif // PPAPI_SHARED_IMPL_PPB_INPUT_EVENT_SHARED_H_ | 154 #endif // PPAPI_SHARED_IMPL_PPB_INPUT_EVENT_SHARED_H_ |
OLD | NEW |