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

Side by Side Diff: ppapi/proxy/ppp_input_event_proxy.h

Issue 7740038: Use macros to define pepper interfaces (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: New patch 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
« no previous file with comments | « ppapi/proxy/ppp_graphics_3d_proxy.cc ('k') | ppapi/proxy/ppp_input_event_proxy.cc » ('j') | 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) 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 #ifndef PPAPI_PROXY_PPP_INPUT_EVENT_PROXY_H_ 5 #ifndef PPAPI_PROXY_PPP_INPUT_EVENT_PROXY_H_
6 #define PPAPI_PROXY_PPP_INPUT_EVENT_PROXY_H_ 6 #define PPAPI_PROXY_PPP_INPUT_EVENT_PROXY_H_
7 7
8 #include "ppapi/c/pp_instance.h" 8 #include "ppapi/c/pp_instance.h"
9 #include "ppapi/proxy/interface_proxy.h" 9 #include "ppapi/proxy/interface_proxy.h"
10 10
11 struct PPP_InputEvent; 11 struct PPP_InputEvent;
12 12
13 namespace ppapi { 13 namespace ppapi {
14 14
15 struct InputEventData; 15 struct InputEventData;
16 16
17 namespace proxy { 17 namespace proxy {
18 18
19 class PPP_InputEvent_Proxy : public InterfaceProxy { 19 class PPP_InputEvent_Proxy : public InterfaceProxy {
20 public: 20 public:
21 PPP_InputEvent_Proxy(Dispatcher* dispatcher, const void* target_interface); 21 PPP_InputEvent_Proxy(Dispatcher* dispatcher);
22 virtual ~PPP_InputEvent_Proxy(); 22 virtual ~PPP_InputEvent_Proxy();
23 23
24 static const Info* GetInfo(); 24 static const Info* GetInfo();
25 25
26 const PPP_InputEvent* ppp_input_event_target() const {
27 return static_cast<const PPP_InputEvent*>(target_interface());
28 }
29
30 // InterfaceProxy implementation. 26 // InterfaceProxy implementation.
31 virtual bool OnMessageReceived(const IPC::Message& msg); 27 virtual bool OnMessageReceived(const IPC::Message& msg);
32 28
33 private: 29 private:
34 // Message handlers. 30 // Message handlers.
35 void OnMsgHandleInputEvent(PP_Instance instance, 31 void OnMsgHandleInputEvent(PP_Instance instance,
36 const ppapi::InputEventData& data); 32 const ppapi::InputEventData& data);
37 void OnMsgHandleFilteredInputEvent(PP_Instance instance, 33 void OnMsgHandleFilteredInputEvent(PP_Instance instance,
38 const ppapi::InputEventData& data, 34 const ppapi::InputEventData& data,
39 PP_Bool* result); 35 PP_Bool* result);
36
37 // When this proxy is in the plugin side, this value caches the interface
38 // pointer so we don't have to retrieve it from the dispatcher each time.
39 // In the host, this value is always NULL.
40 const PPP_InputEvent* ppp_input_event_impl_;
41
42 DISALLOW_COPY_AND_ASSIGN(PPP_InputEvent_Proxy);
40 }; 43 };
41 44
42 } // namespace proxy 45 } // namespace proxy
43 } // namespace ppapi 46 } // namespace ppapi
44 47
45 #endif // PPAPI_PROXY_PPP_INPUT_EVENT_PROXY_H_ 48 #endif // PPAPI_PROXY_PPP_INPUT_EVENT_PROXY_H_
OLDNEW
« no previous file with comments | « ppapi/proxy/ppp_graphics_3d_proxy.cc ('k') | ppapi/proxy/ppp_input_event_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698