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

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

Issue 7882004: Declarations for Pepper IME API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Clarified the specification of GetSegmentAt(). Created 9 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "webkit/plugins/ppapi/event_conversion.h" 5 #include "webkit/plugins/ppapi/event_conversion.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/i18n/char_iterator.h" 8 #include "base/i18n/char_iterator.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 web_input_event.reset(BuildMouseWheelEvent(event)); 300 web_input_event.reset(BuildMouseWheelEvent(event));
301 break; 301 break;
302 case PP_INPUTEVENT_TYPE_RAWKEYDOWN: 302 case PP_INPUTEVENT_TYPE_RAWKEYDOWN:
303 case PP_INPUTEVENT_TYPE_KEYDOWN: 303 case PP_INPUTEVENT_TYPE_KEYDOWN:
304 case PP_INPUTEVENT_TYPE_KEYUP: 304 case PP_INPUTEVENT_TYPE_KEYUP:
305 web_input_event.reset(BuildKeyEvent(event)); 305 web_input_event.reset(BuildKeyEvent(event));
306 break; 306 break;
307 case PP_INPUTEVENT_TYPE_CHAR: 307 case PP_INPUTEVENT_TYPE_CHAR:
308 web_input_event.reset(BuildCharEvent(event)); 308 web_input_event.reset(BuildCharEvent(event));
309 break; 309 break;
310 case PP_INPUTEVENT_TYPE_COMPOSITION_START:
311 case PP_INPUTEVENT_TYPE_COMPOSITION_UPDATE:
312 case PP_INPUTEVENT_TYPE_COMPOSITION_END:
313 case PP_INPUTEVENT_TYPE_IME_TEXT:
314 // TODO(kinaba) implement in WebKit an event structure to handle
315 // composition events.
316 NOTREACHED();
317 break;
310 } 318 }
311 319
312 return web_input_event.release(); 320 return web_input_event.release();
313 } 321 }
314 322
315 PP_InputEvent_Class ClassifyInputEvent(WebInputEvent::Type type) { 323 PP_InputEvent_Class ClassifyInputEvent(WebInputEvent::Type type) {
316 switch (type) { 324 switch (type) {
317 case WebInputEvent::MouseDown: 325 case WebInputEvent::MouseDown:
318 case WebInputEvent::MouseUp: 326 case WebInputEvent::MouseUp:
319 case WebInputEvent::MouseMove: 327 case WebInputEvent::MouseMove:
(...skipping 10 matching lines...) Expand all
330 return PP_INPUTEVENT_CLASS_KEYBOARD; 338 return PP_INPUTEVENT_CLASS_KEYBOARD;
331 case WebInputEvent::Undefined: 339 case WebInputEvent::Undefined:
332 default: 340 default:
333 NOTREACHED(); 341 NOTREACHED();
334 return PP_InputEvent_Class(0); 342 return PP_InputEvent_Class(0);
335 } 343 }
336 } 344 }
337 345
338 } // namespace ppapi 346 } // namespace ppapi
339 } // namespace webkit 347 } // namespace webkit
OLDNEW
« ppapi/api/ppb_input_event.idl ('K') | « ppapi/tests/all_cpp_includes.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698