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

Side by Side Diff: ppapi/native_client/src/shared/ppapi_proxy/browser_ppp_input_event.cc

Issue 10543159: ppapi: Add support for touch events. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 6 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
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 "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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 case PP_INPUTEVENT_TYPE_UNDEFINED: 69 case PP_INPUTEVENT_TYPE_UNDEFINED:
70 return PP_FALSE; 70 return PP_FALSE;
71 // TODO(nfullagar): Implement support for event types below. 71 // TODO(nfullagar): Implement support for event types below.
72 case PP_INPUTEVENT_TYPE_IME_COMPOSITION_START: 72 case PP_INPUTEVENT_TYPE_IME_COMPOSITION_START:
73 case PP_INPUTEVENT_TYPE_IME_COMPOSITION_UPDATE: 73 case PP_INPUTEVENT_TYPE_IME_COMPOSITION_UPDATE:
74 case PP_INPUTEVENT_TYPE_IME_COMPOSITION_END: 74 case PP_INPUTEVENT_TYPE_IME_COMPOSITION_END:
75 case PP_INPUTEVENT_TYPE_IME_TEXT: 75 case PP_INPUTEVENT_TYPE_IME_TEXT:
76 DebugPrintf(" No implementation for event type %d\n", 76 DebugPrintf(" No implementation for event type %d\n",
77 data.event_type); 77 data.event_type);
78 return PP_FALSE; 78 return PP_FALSE;
79 case PP_INPUTEVENT_TYPE_TOUCHSTART:
80 case PP_INPUTEVENT_TYPE_TOUCHMOVE:
81 case PP_INPUTEVENT_TYPE_TOUCHEND:
82 case PP_INPUTEVENT_TYPE_TOUCHCANCEL:
83 DebugPrintf(" No implementation for event type %d\n",
84 data.event_type);
85 return PP_FALSE;
79 // No default case; if any new types are added we should get a compile 86 // No default case; if any new types are added we should get a compile
80 // warning. 87 // warning.
81 } 88 }
82 // Now data and character_text have all the data we want to send to the 89 // Now data and character_text have all the data we want to send to the
83 // untrusted side. 90 // untrusted side.
84 91
85 // character_text should either be undefined or a string type. 92 // character_text should either be undefined or a string type.
86 DCHECK((character_text.type == PP_VARTYPE_UNDEFINED) || 93 DCHECK((character_text.type == PP_VARTYPE_UNDEFINED) ||
87 (character_text.type == PP_VARTYPE_STRING)); 94 (character_text.type == PP_VARTYPE_STRING));
88 // Serialize the character_text Var. 95 // Serialize the character_text Var.
(...skipping 27 matching lines...) Expand all
116 } // namespace 123 } // namespace
117 124
118 const PPP_InputEvent* BrowserInputEvent::GetInterface() { 125 const PPP_InputEvent* BrowserInputEvent::GetInterface() {
119 static const PPP_InputEvent input_event_interface = { 126 static const PPP_InputEvent input_event_interface = {
120 HandleInputEvent 127 HandleInputEvent
121 }; 128 };
122 return &input_event_interface; 129 return &input_event_interface;
123 } 130 }
124 131
125 } // namespace ppapi_proxy 132 } // namespace ppapi_proxy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698