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

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

Issue 7285010: Implement an input event resource. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 5 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 #ifndef WEBKIT_PLUGINS_PPAPI_EVENT_CONVERSION_H_ 5 #ifndef WEBKIT_PLUGINS_PPAPI_EVENT_CONVERSION_H_
6 #define WEBKIT_PLUGINS_PPAPI_EVENT_CONVERSION_H_ 6 #define WEBKIT_PLUGINS_PPAPI_EVENT_CONVERSION_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "ppapi/c/ppb_input_event.h"
11 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h"
12
10 struct PP_InputEvent; 13 struct PP_InputEvent;
11 14
15 namespace ppapi {
16 struct InputEventData;
17 }
18
12 namespace WebKit { 19 namespace WebKit {
13 class WebInputEvent; 20 class WebInputEvent;
14 } 21 }
15 22
16 namespace webkit { 23 namespace webkit {
17 namespace ppapi { 24 namespace ppapi {
18 25
19 // Converts the given WebKit event to one or possibly multiple PP_InputEvents. 26 // Converts the given WebKit event to one or possibly multiple PP_InputEvents.
20 // The generated events will be filled into the given vector. On failure, no 27 // The generated events will be filled into the given vector. On failure, no
21 // events will ge generated and the vector will be empty. 28 // events will ge generated and the vector will be empty.
22 void CreatePPEvent(const WebKit::WebInputEvent& event, 29 void CreatePPEvent(const WebKit::WebInputEvent& event,
23 std::vector<PP_InputEvent>* pp_events); 30 std::vector<PP_InputEvent>* pp_events);
24 31
32 void CreateInputEventData(const WebKit::WebInputEvent& event,
33 std::vector< ::ppapi::InputEventData >* pp_events);
34
25 // Creates a WebInputEvent from the given PP_InputEvent. If it fails, returns 35 // Creates a WebInputEvent from the given PP_InputEvent. If it fails, returns
26 // NULL. The caller owns the created object on success. 36 // NULL. The caller owns the created object on success.
27 WebKit::WebInputEvent* CreateWebInputEvent(const PP_InputEvent& event); 37 WebKit::WebInputEvent* CreateWebInputEvent(const PP_InputEvent& event);
38 WebKit::WebInputEvent* CreateWebInputEvent(
39 const ::ppapi::InputEventData& event);
40
41 // Returns the PPAPI event class for the given WebKit event type. The given
42 // type should not be "Undefined" since there's no corresponding PPAPI class.
43 PP_InputEvent_Class ClassifyInputEvent(WebKit::WebInputEvent::Type type);
28 44
29 } // namespace ppapi 45 } // namespace ppapi
30 } // namespace webkit 46 } // namespace webkit
31 47
32 #endif // WEBKIT_PLUGINS_PPAPI_EVENT_CONVERSION_H_ 48 #endif // WEBKIT_PLUGINS_PPAPI_EVENT_CONVERSION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698