Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(15)

Side by Side Diff: webkit/plugins/ppapi/event_conversion.cc

Issue 10873074: ppapi: Make sure the touch-event interface is detected correctly. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ppapi/thunk/ppb_input_event_thunk.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « ppapi/thunk/ppb_input_event_thunk.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698