| 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 |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 // shared InputEventData structure | 65 // shared InputEventData structure |
| 66 class PPAPI_SHARED_EXPORT PPB_InputEvent_Shared | 66 class PPAPI_SHARED_EXPORT PPB_InputEvent_Shared |
| 67 : public Resource, | 67 : public Resource, |
| 68 public thunk::PPB_InputEvent_API { | 68 public thunk::PPB_InputEvent_API { |
| 69 public: | 69 public: |
| 70 PPB_InputEvent_Shared(ResourceObjectType type, | 70 PPB_InputEvent_Shared(ResourceObjectType type, |
| 71 PP_Instance instance, | 71 PP_Instance instance, |
| 72 const InputEventData& data); | 72 const InputEventData& data); |
| 73 | 73 |
| 74 // Resource overrides. | 74 // Resource overrides. |
| 75 virtual PPB_InputEvent_API* AsPPB_InputEvent_API() OVERRIDE; | 75 virtual PPB_InputEvent_API* AsPPB_InputEvent_API() override; |
| 76 | 76 |
| 77 // PPB_InputEvent_API implementation. | 77 // PPB_InputEvent_API implementation. |
| 78 virtual const InputEventData& GetInputEventData() const OVERRIDE; | 78 virtual const InputEventData& GetInputEventData() const override; |
| 79 virtual PP_InputEvent_Type GetType() OVERRIDE; | 79 virtual PP_InputEvent_Type GetType() override; |
| 80 virtual PP_TimeTicks GetTimeStamp() OVERRIDE; | 80 virtual PP_TimeTicks GetTimeStamp() override; |
| 81 virtual uint32_t GetModifiers() OVERRIDE; | 81 virtual uint32_t GetModifiers() override; |
| 82 virtual PP_InputEvent_MouseButton GetMouseButton() OVERRIDE; | 82 virtual PP_InputEvent_MouseButton GetMouseButton() override; |
| 83 virtual PP_Point GetMousePosition() OVERRIDE; | 83 virtual PP_Point GetMousePosition() override; |
| 84 virtual int32_t GetMouseClickCount() OVERRIDE; | 84 virtual int32_t GetMouseClickCount() override; |
| 85 virtual PP_Point GetMouseMovement() OVERRIDE; | 85 virtual PP_Point GetMouseMovement() override; |
| 86 virtual PP_FloatPoint GetWheelDelta() OVERRIDE; | 86 virtual PP_FloatPoint GetWheelDelta() override; |
| 87 virtual PP_FloatPoint GetWheelTicks() OVERRIDE; | 87 virtual PP_FloatPoint GetWheelTicks() override; |
| 88 virtual PP_Bool GetWheelScrollByPage() OVERRIDE; | 88 virtual PP_Bool GetWheelScrollByPage() override; |
| 89 virtual uint32_t GetKeyCode() OVERRIDE; | 89 virtual uint32_t GetKeyCode() override; |
| 90 virtual PP_Var GetCharacterText() OVERRIDE; | 90 virtual PP_Var GetCharacterText() override; |
| 91 virtual PP_Var GetCode() OVERRIDE; | 91 virtual PP_Var GetCode() override; |
| 92 virtual uint32_t GetIMESegmentNumber() OVERRIDE; | 92 virtual uint32_t GetIMESegmentNumber() override; |
| 93 virtual uint32_t GetIMESegmentOffset(uint32_t index) OVERRIDE; | 93 virtual uint32_t GetIMESegmentOffset(uint32_t index) override; |
| 94 virtual int32_t GetIMETargetSegment() OVERRIDE; | 94 virtual int32_t GetIMETargetSegment() override; |
| 95 virtual void GetIMESelection(uint32_t* start, uint32_t* end) OVERRIDE; | 95 virtual void GetIMESelection(uint32_t* start, uint32_t* end) override; |
| 96 virtual void AddTouchPoint(PP_TouchListType list, | 96 virtual void AddTouchPoint(PP_TouchListType list, |
| 97 const PP_TouchPoint& point) OVERRIDE; | 97 const PP_TouchPoint& point) override; |
| 98 virtual uint32_t GetTouchCount(PP_TouchListType list) OVERRIDE; | 98 virtual uint32_t GetTouchCount(PP_TouchListType list) override; |
| 99 virtual PP_TouchPoint GetTouchByIndex(PP_TouchListType list, | 99 virtual PP_TouchPoint GetTouchByIndex(PP_TouchListType list, |
| 100 uint32_t index) OVERRIDE; | 100 uint32_t index) override; |
| 101 virtual PP_TouchPoint GetTouchById(PP_TouchListType list, | 101 virtual PP_TouchPoint GetTouchById(PP_TouchListType list, |
| 102 uint32_t id) OVERRIDE; | 102 uint32_t id) override; |
| 103 virtual PP_Bool TraceInputLatency(PP_Bool has_damage) OVERRIDE; | 103 virtual PP_Bool TraceInputLatency(PP_Bool has_damage) override; |
| 104 | 104 |
| 105 // Implementations for event creation. | 105 // Implementations for event creation. |
| 106 static PP_Resource CreateIMEInputEvent(ResourceObjectType type, | 106 static PP_Resource CreateIMEInputEvent(ResourceObjectType type, |
| 107 PP_Instance instance, | 107 PP_Instance instance, |
| 108 PP_InputEvent_Type event_type, | 108 PP_InputEvent_Type event_type, |
| 109 PP_TimeTicks time_stamp, | 109 PP_TimeTicks time_stamp, |
| 110 struct PP_Var text, | 110 struct PP_Var text, |
| 111 uint32_t segment_number, | 111 uint32_t segment_number, |
| 112 const uint32_t* segment_offsets, | 112 const uint32_t* segment_offsets, |
| 113 int32_t target_segment, | 113 int32_t target_segment, |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 | 146 |
| 147 private: | 147 private: |
| 148 InputEventData data_; | 148 InputEventData data_; |
| 149 | 149 |
| 150 DISALLOW_IMPLICIT_CONSTRUCTORS(PPB_InputEvent_Shared); | 150 DISALLOW_IMPLICIT_CONSTRUCTORS(PPB_InputEvent_Shared); |
| 151 }; | 151 }; |
| 152 | 152 |
| 153 } // namespace ppapi | 153 } // namespace ppapi |
| 154 | 154 |
| 155 #endif // PPAPI_SHARED_IMPL_PPB_INPUT_EVENT_SHARED_H_ | 155 #endif // PPAPI_SHARED_IMPL_PPB_INPUT_EVENT_SHARED_H_ |
| OLD | NEW |