OLD | NEW |
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_GLUE_PLUGINS_PEPPER_EVENT_H_ | 5 #ifndef WEBKIT_PLUGINS_PPAPI_EVENT_CONVERSION_H_ |
6 #define WEBKIT_GLUE_PLUGINS_PEPPER_EVENT_H_ | 6 #define WEBKIT_PLUGINS_PPAPI_EVENT_CONVERSION_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 struct PP_InputEvent; | 10 struct PP_InputEvent; |
11 | 11 |
12 namespace WebKit { | 12 namespace WebKit { |
13 class WebInputEvent; | 13 class WebInputEvent; |
14 } | 14 } |
15 | 15 |
16 namespace pepper { | 16 namespace webkit { |
| 17 namespace ppapi { |
17 | 18 |
18 // Converts the given WebKit event to one or possibly multiple PP_InputEvents. | 19 // Converts the given WebKit event to one or possibly multiple PP_InputEvents. |
19 // The generated events will be filled into the given vector. On failure, no | 20 // The generated events will be filled into the given vector. On failure, no |
20 // events will ge generated and the vector will be empty. | 21 // events will ge generated and the vector will be empty. |
21 void CreatePPEvent(const WebKit::WebInputEvent& event, | 22 void CreatePPEvent(const WebKit::WebInputEvent& event, |
22 std::vector<PP_InputEvent>* pp_events); | 23 std::vector<PP_InputEvent>* pp_events); |
23 | 24 |
24 // Creates a WebInputEvent from the given PP_InputEvent. If it fails, returns | 25 // Creates a WebInputEvent from the given PP_InputEvent. If it fails, returns |
25 // NULL. The caller owns the created object on success. | 26 // NULL. The caller owns the created object on success. |
26 WebKit::WebInputEvent* CreateWebInputEvent(const PP_InputEvent& event); | 27 WebKit::WebInputEvent* CreateWebInputEvent(const PP_InputEvent& event); |
27 | 28 |
28 } // namespace pepper | 29 } // namespace ppapi |
| 30 } // namespace webkit |
29 | 31 |
30 #endif // WEBKIT_GLUE_PLUGINS_PEPPER_EVENT_H_ | 32 #endif // WEBKIT_PLUGINS_PPAPI_EVENT_CONVERSION_H_ |
OLD | NEW |