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 PPAPI_PPB_GRAPHICS_2D_PROXY_H_ | 5 #ifndef PPAPI_PPB_GRAPHICS_2D_PROXY_H_ |
6 #define PPAPI_PPB_GRAPHICS_2D_PROXY_H_ | 6 #define PPAPI_PPB_GRAPHICS_2D_PROXY_H_ |
7 | 7 |
8 #include "ppapi/c/pp_bool.h" | 8 #include "ppapi/c/pp_bool.h" |
9 #include "ppapi/c/pp_completion_callback.h" | 9 #include "ppapi/c/pp_completion_callback.h" |
10 #include "ppapi/c/pp_module.h" | 10 #include "ppapi/c/pp_module.h" |
(...skipping 17 matching lines...) Expand all Loading... |
28 PPB_Graphics2D_Proxy(Dispatcher* dispatcher, const void* target_interface); | 28 PPB_Graphics2D_Proxy(Dispatcher* dispatcher, const void* target_interface); |
29 virtual ~PPB_Graphics2D_Proxy(); | 29 virtual ~PPB_Graphics2D_Proxy(); |
30 | 30 |
31 const PPB_Graphics2D* ppb_graphics_2d_target() const { | 31 const PPB_Graphics2D* ppb_graphics_2d_target() const { |
32 return static_cast<const PPB_Graphics2D*>(target_interface()); | 32 return static_cast<const PPB_Graphics2D*>(target_interface()); |
33 } | 33 } |
34 | 34 |
35 // InterfaceProxy implementation. | 35 // InterfaceProxy implementation. |
36 virtual const void* GetSourceInterface() const; | 36 virtual const void* GetSourceInterface() const; |
37 virtual InterfaceID GetInterfaceId() const; | 37 virtual InterfaceID GetInterfaceId() const; |
38 virtual void OnMessageReceived(const IPC::Message& msg); | 38 virtual bool OnMessageReceived(const IPC::Message& msg); |
39 | 39 |
40 private: | 40 private: |
41 // Plugin->renderer message handlers. | 41 // Plugin->renderer message handlers. |
42 void OnMsgCreate(PP_Module module, | 42 void OnMsgCreate(PP_Module module, |
43 const PP_Size& size, | 43 const PP_Size& size, |
44 PP_Bool is_always_opaque, | 44 PP_Bool is_always_opaque, |
45 PP_Resource* result); | 45 PP_Resource* result); |
46 void OnMsgPaintImageData(PP_Resource graphics_2d, | 46 void OnMsgPaintImageData(PP_Resource graphics_2d, |
47 PP_Resource image_data, | 47 PP_Resource image_data, |
48 const PP_Point& top_left, | 48 const PP_Point& top_left, |
(...skipping 14 matching lines...) Expand all Loading... |
63 void SendFlushACKToPlugin(int32_t result, PP_Resource graphics_2d); | 63 void SendFlushACKToPlugin(int32_t result, PP_Resource graphics_2d); |
64 | 64 |
65 CompletionCallbackFactory<PPB_Graphics2D_Proxy, | 65 CompletionCallbackFactory<PPB_Graphics2D_Proxy, |
66 ProxyNonThreadSafeRefCount> callback_factory_; | 66 ProxyNonThreadSafeRefCount> callback_factory_; |
67 }; | 67 }; |
68 | 68 |
69 } // namespace proxy | 69 } // namespace proxy |
70 } // namespace pp | 70 } // namespace pp |
71 | 71 |
72 #endif // PPAPI_PPB_GRAPHICS_2D_PROXY_H_ | 72 #endif // PPAPI_PPB_GRAPHICS_2D_PROXY_H_ |
OLD | NEW |