| 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 #include <map> | 5 #include <map> |
| 6 | 6 |
| 7 #include "webkit/plugins/ppapi/event_conversion.h" | 7 #include "webkit/plugins/ppapi/event_conversion.h" |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/i18n/char_iterator.h" | 10 #include "base/i18n/char_iterator.h" |
| (...skipping 597 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 608 int plugin_y) { | 608 int plugin_y) { |
| 609 std::vector<linked_ptr<WebInputEvent> > events; | 609 std::vector<linked_ptr<WebInputEvent> > events; |
| 610 linked_ptr<WebInputEvent> original_event(CreateWebInputEvent(event)); | 610 linked_ptr<WebInputEvent> original_event(CreateWebInputEvent(event)); |
| 611 | 611 |
| 612 switch (event.event_type) { | 612 switch (event.event_type) { |
| 613 case PP_INPUTEVENT_TYPE_MOUSEDOWN: | 613 case PP_INPUTEVENT_TYPE_MOUSEDOWN: |
| 614 case PP_INPUTEVENT_TYPE_MOUSEUP: | 614 case PP_INPUTEVENT_TYPE_MOUSEUP: |
| 615 case PP_INPUTEVENT_TYPE_MOUSEMOVE: | 615 case PP_INPUTEVENT_TYPE_MOUSEMOVE: |
| 616 case PP_INPUTEVENT_TYPE_MOUSEENTER: | 616 case PP_INPUTEVENT_TYPE_MOUSEENTER: |
| 617 case PP_INPUTEVENT_TYPE_MOUSELEAVE: | 617 case PP_INPUTEVENT_TYPE_MOUSELEAVE: |
| 618 case PP_INPUTEVENT_TYPE_TOUCHSTART: |
| 619 case PP_INPUTEVENT_TYPE_TOUCHMOVE: |
| 620 case PP_INPUTEVENT_TYPE_TOUCHEND: |
| 621 case PP_INPUTEVENT_TYPE_TOUCHCANCEL: |
| 618 events.push_back(original_event); | 622 events.push_back(original_event); |
| 619 break; | 623 break; |
| 620 | 624 |
| 621 case PP_INPUTEVENT_TYPE_WHEEL: { | 625 case PP_INPUTEVENT_TYPE_WHEEL: { |
| 622 WebMouseWheelEvent* web_mouse_wheel_event = | 626 WebMouseWheelEvent* web_mouse_wheel_event = |
| 623 static_cast<WebMouseWheelEvent*>(original_event.get()); | 627 static_cast<WebMouseWheelEvent*>(original_event.get()); |
| 624 web_mouse_wheel_event->x = plugin_x; | 628 web_mouse_wheel_event->x = plugin_x; |
| 625 web_mouse_wheel_event->y = plugin_y; | 629 web_mouse_wheel_event->y = plugin_y; |
| 626 events.push_back(original_event); | 630 events.push_back(original_event); |
| 627 break; | 631 break; |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 741 output_pad.buttons_length = webkit_pad.buttonsLength; | 745 output_pad.buttons_length = webkit_pad.buttonsLength; |
| 742 memcpy(output_pad.buttons, | 746 memcpy(output_pad.buttons, |
| 743 webkit_pad.buttons, | 747 webkit_pad.buttons, |
| 744 sizeof(output_pad.buttons)); | 748 sizeof(output_pad.buttons)); |
| 745 } | 749 } |
| 746 } | 750 } |
| 747 } | 751 } |
| 748 | 752 |
| 749 } // namespace ppapi | 753 } // namespace ppapi |
| 750 } // namespace webkit | 754 } // namespace webkit |
| OLD | NEW |