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

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

Issue 7844018: Revert 100748 - This patch tries to remove most of the manual registration for Pepper interfaces,... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: 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/ppb_crypto_proxy.cc ('k') | ppapi/proxy/ppb_cursor_control_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_PPB_CURSOR_CONTROL_PROXY_H_ 5 #ifndef PPAPI_PPB_CURSOR_CONTROL_PROXY_H_
6 #define PPAPI_PPB_CURSOR_CONTROL_PROXY_H_ 6 #define PPAPI_PPB_CURSOR_CONTROL_PROXY_H_
7 7
8 #include "ppapi/c/pp_completion_callback.h" 8 #include "ppapi/c/pp_completion_callback.h"
9 #include "ppapi/c/pp_bool.h" 9 #include "ppapi/c/pp_bool.h"
10 #include "ppapi/c/pp_instance.h" 10 #include "ppapi/c/pp_instance.h"
11 #include "ppapi/c/pp_point.h" 11 #include "ppapi/c/pp_point.h"
12 #include "ppapi/c/pp_resource.h" 12 #include "ppapi/c/pp_resource.h"
13 #include "ppapi/proxy/interface_proxy.h" 13 #include "ppapi/proxy/interface_proxy.h"
14 #include "ppapi/shared_impl/function_group_base.h" 14 #include "ppapi/shared_impl/function_group_base.h"
15 #include "ppapi/shared_impl/host_resource.h" 15 #include "ppapi/shared_impl/host_resource.h"
16 #include "ppapi/thunk/ppb_cursor_control_api.h" 16 #include "ppapi/thunk/ppb_cursor_control_api.h"
17 17
18 struct PPB_CursorControl_Dev; 18 struct PPB_CursorControl_Dev;
19 19
20 namespace ppapi { 20 namespace ppapi {
21 namespace proxy { 21 namespace proxy {
22 22
23 class PPB_CursorControl_Proxy 23 class PPB_CursorControl_Proxy
24 : public InterfaceProxy, 24 : public ppapi::FunctionGroupBase,
25 public ppapi::thunk::PPB_CursorControl_FunctionAPI { 25 public ppapi::thunk::PPB_CursorControl_FunctionAPI,
26 public InterfaceProxy {
26 public: 27 public:
27 PPB_CursorControl_Proxy(Dispatcher* dispatcher); 28 PPB_CursorControl_Proxy(Dispatcher* dispatcher, const void* target_interface);
28 virtual ~PPB_CursorControl_Proxy(); 29 virtual ~PPB_CursorControl_Proxy();
29 30
31 static const Info* GetInfo();
32
30 // FunctionGroupBase overrides. 33 // FunctionGroupBase overrides.
31 ppapi::thunk::PPB_CursorControl_FunctionAPI* AsPPB_CursorControl_FunctionAPI() 34 ppapi::thunk::PPB_CursorControl_FunctionAPI* AsPPB_CursorControl_FunctionAPI()
32 OVERRIDE; 35 OVERRIDE;
33 36
34 // PPB_CursorControl_FunctionAPI implementation. 37 // PPB_CursorControl_FunctionAPI implementation.
35 virtual PP_Bool SetCursor(PP_Instance instance, 38 virtual PP_Bool SetCursor(PP_Instance instance,
36 PP_CursorType_Dev type, 39 PP_CursorType_Dev type,
37 PP_Resource custom_image_id, 40 PP_Resource custom_image_id,
38 const PP_Point* hot_spot) OVERRIDE; 41 const PP_Point* hot_spot) OVERRIDE;
39 virtual PP_Bool LockCursor(PP_Instance instance) OVERRIDE; 42 virtual PP_Bool LockCursor(PP_Instance instance) OVERRIDE;
40 virtual PP_Bool UnlockCursor(PP_Instance instance) OVERRIDE; 43 virtual PP_Bool UnlockCursor(PP_Instance instance) OVERRIDE;
41 virtual PP_Bool HasCursorLock(PP_Instance instance) OVERRIDE; 44 virtual PP_Bool HasCursorLock(PP_Instance instance) OVERRIDE;
42 virtual PP_Bool CanLockCursor(PP_Instance instance) OVERRIDE; 45 virtual PP_Bool CanLockCursor(PP_Instance instance) OVERRIDE;
43 46
44 // InterfaceProxy implementation. 47 // InterfaceProxy implementation.
45 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; 48 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE;
46 49
47 static const InterfaceID kInterfaceID = INTERFACE_ID_PPB_CURSORCONTROL;
48
49 private: 50 private:
50 // Message handlers. 51 // Message handlers.
51 void OnMsgSetCursor(PP_Instance instance, 52 void OnMsgSetCursor(PP_Instance instance,
52 int32_t type, 53 int32_t type,
53 const ppapi::HostResource& custom_image, 54 const ppapi::HostResource& custom_image,
54 const PP_Point& hot_spot, 55 const PP_Point& hot_spot,
55 PP_Bool* result); 56 PP_Bool* result);
56 void OnMsgLockCursor(PP_Instance instance, 57 void OnMsgLockCursor(PP_Instance instance,
57 PP_Bool* result); 58 PP_Bool* result);
58 void OnMsgUnlockCursor(PP_Instance instance, 59 void OnMsgUnlockCursor(PP_Instance instance,
59 PP_Bool* result); 60 PP_Bool* result);
60 void OnMsgHasCursorLock(PP_Instance instance, 61 void OnMsgHasCursorLock(PP_Instance instance,
61 PP_Bool* result); 62 PP_Bool* result);
62 void OnMsgCanLockCursor(PP_Instance instance, 63 void OnMsgCanLockCursor(PP_Instance instance,
63 PP_Bool* result); 64 PP_Bool* result);
64 }; 65 };
65 66
66 } // namespace proxy 67 } // namespace proxy
67 } // namespace ppapi 68 } // namespace ppapi
68 69
69 #endif // PPAPI_PPB_CURSOR_CONTROL_PROXY_H_ 70 #endif // PPAPI_PPB_CURSOR_CONTROL_PROXY_H_
OLDNEW
« no previous file with comments | « ppapi/proxy/ppb_crypto_proxy.cc ('k') | ppapi/proxy/ppb_cursor_control_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698