| OLD | NEW |
| 1 // Copyright (c) 2011 The Native Client Authors. All rights reserved. | 1 // Copyright (c) 2011 The Native Client 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 "native_client/src/shared/ppapi_proxy/browser_ppp_input_event.h" | 5 #include "native_client/src/shared/ppapi_proxy/browser_ppp_input_event.h" |
| 6 | 6 |
| 7 #include "native_client/src/include/nacl_scoped_ptr.h" | 7 #include "native_client/src/include/nacl_scoped_ptr.h" |
| 8 #include "native_client/src/include/portability.h" | 8 #include "native_client/src/include/portability.h" |
| 9 #include "native_client/src/shared/ppapi_proxy/browser_globals.h" | 9 #include "native_client/src/shared/ppapi_proxy/browser_globals.h" |
| 10 #include "native_client/src/shared/ppapi_proxy/input_event_data.h" | 10 #include "native_client/src/shared/ppapi_proxy/input_event_data.h" |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 | 32 |
| 33 switch (data.event_type) { | 33 switch (data.event_type) { |
| 34 // These events all use the PPB_MouseInputEvent interface. | 34 // These events all use the PPB_MouseInputEvent interface. |
| 35 case PP_INPUTEVENT_TYPE_MOUSEDOWN: | 35 case PP_INPUTEVENT_TYPE_MOUSEDOWN: |
| 36 case PP_INPUTEVENT_TYPE_MOUSEUP: | 36 case PP_INPUTEVENT_TYPE_MOUSEUP: |
| 37 case PP_INPUTEVENT_TYPE_MOUSEENTER: | 37 case PP_INPUTEVENT_TYPE_MOUSEENTER: |
| 38 case PP_INPUTEVENT_TYPE_MOUSELEAVE: | 38 case PP_INPUTEVENT_TYPE_MOUSELEAVE: |
| 39 case PP_INPUTEVENT_TYPE_MOUSEMOVE: | 39 case PP_INPUTEVENT_TYPE_MOUSEMOVE: |
| 40 case PP_INPUTEVENT_TYPE_CONTEXTMENU: | 40 case PP_INPUTEVENT_TYPE_CONTEXTMENU: |
| 41 data.mouse_button = | 41 data.mouse_button = |
| 42 PPBMouseInputEventInterface()->GetButton(input_event); | 42 PPBMouseInputEventDevInterface()->GetButton(input_event); |
| 43 data.mouse_position = | 43 data.mouse_position = |
| 44 PPBMouseInputEventInterface()->GetPosition(input_event); | 44 PPBMouseInputEventDevInterface()->GetPosition(input_event); |
| 45 data.mouse_click_count = | 45 data.mouse_click_count = |
| 46 PPBMouseInputEventInterface()->GetClickCount(input_event); | 46 PPBMouseInputEventDevInterface()->GetClickCount(input_event); |
| 47 data.mouse_movement = | 47 data.mouse_movement = |
| 48 PPBMouseInputEventInterface()->GetMovement(input_event); | 48 PPBMouseInputEventDevInterface()->GetMovement(input_event); |
| 49 break; | 49 break; |
| 50 // This event uses the PPB_WheelInputEvent interface. | 50 // This event uses the PPB_WheelInputEvent interface. |
| 51 case PP_INPUTEVENT_TYPE_WHEEL: | 51 case PP_INPUTEVENT_TYPE_WHEEL: |
| 52 data.wheel_delta = | 52 data.wheel_delta = |
| 53 PPBWheelInputEventInterface()->GetDelta(input_event); | 53 PPBWheelInputEventInterface()->GetDelta(input_event); |
| 54 data.wheel_ticks = | 54 data.wheel_ticks = |
| 55 PPBWheelInputEventInterface()->GetTicks(input_event); | 55 PPBWheelInputEventInterface()->GetTicks(input_event); |
| 56 data.wheel_scroll_by_page = | 56 data.wheel_scroll_by_page = |
| 57 PPBWheelInputEventInterface()->GetScrollByPage(input_event); | 57 PPBWheelInputEventInterface()->GetScrollByPage(input_event); |
| 58 break; | 58 break; |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 } // namespace | 108 } // namespace |
| 109 | 109 |
| 110 const PPP_InputEvent* BrowserInputEvent::GetInterface() { | 110 const PPP_InputEvent* BrowserInputEvent::GetInterface() { |
| 111 static const PPP_InputEvent input_event_interface = { | 111 static const PPP_InputEvent input_event_interface = { |
| 112 HandleInputEvent | 112 HandleInputEvent |
| 113 }; | 113 }; |
| 114 return &input_event_interface; | 114 return &input_event_interface; |
| 115 } | 115 } |
| 116 | 116 |
| 117 } // namespace ppapi_proxy | 117 } // namespace ppapi_proxy |
| OLD | NEW |