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

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

Issue 8790009: Regularize how ImageData and Graphics2D are created. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix comment Created 9 years 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) 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_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 21 matching lines...) Expand all
32 static PP_Resource CreateProxyResource(PP_Instance instance, 32 static PP_Resource CreateProxyResource(PP_Instance instance,
33 const PP_Size& size, 33 const PP_Size& size,
34 PP_Bool is_always_opaque); 34 PP_Bool is_always_opaque);
35 35
36 // InterfaceProxy implementation. 36 // InterfaceProxy implementation.
37 virtual bool OnMessageReceived(const IPC::Message& msg); 37 virtual bool OnMessageReceived(const IPC::Message& msg);
38 38
39 static const ApiID kApiID = API_ID_PPB_GRAPHICS_2D; 39 static const ApiID kApiID = API_ID_PPB_GRAPHICS_2D;
40 40
41 private: 41 private:
42 // Plugin->renderer message handlers. 42 // Plugin->host message handlers.
43 void OnMsgPaintImageData(const ppapi::HostResource& graphics_2d, 43 void OnHostMsgCreate(PP_Instance instance,
44 const ppapi::HostResource& image_data, 44 const PP_Size& size,
45 const PP_Point& top_left, 45 PP_Bool is_always_opaque,
46 bool src_rect_specified, 46 HostResource* result);
47 const PP_Rect& src_rect); 47 void OnHostMsgPaintImageData(const HostResource& graphics_2d,
48 void OnMsgScroll(const ppapi::HostResource& graphics_2d, 48 const HostResource& image_data,
49 bool clip_specified, 49 const PP_Point& top_left,
50 const PP_Rect& clip, 50 bool src_rect_specified,
51 const PP_Point& amount); 51 const PP_Rect& src_rect);
52 void OnMsgReplaceContents(const ppapi::HostResource& graphics_2d, 52 void OnHostMsgScroll(const HostResource& graphics_2d,
53 const ppapi::HostResource& image_data); 53 bool clip_specified,
54 void OnMsgFlush(const ppapi::HostResource& graphics_2d); 54 const PP_Rect& clip,
55 const PP_Point& amount);
56 void OnHostMsgReplaceContents(const HostResource& graphics_2d,
57 const HostResource& image_data);
58 void OnHostMsgFlush(const HostResource& graphics_2d);
55 59
56 // Renderer->plugin message handlers. 60 // Host->plugin message handlers.
57 void OnMsgFlushACK(const ppapi::HostResource& graphics_2d, 61 void OnPluginMsgFlushACK(const HostResource& graphics_2d,
58 int32_t pp_error); 62 int32_t pp_error);
59 63
60 // Called in the renderer to send the given flush ACK to the plugin. 64 // Called in the renderer to send the given flush ACK to the plugin.
61 void SendFlushACKToPlugin(int32_t result, 65 void SendFlushACKToPlugin(int32_t result,
62 const ppapi::HostResource& graphics_2d); 66 const HostResource& graphics_2d);
63 67
64 pp::CompletionCallbackFactory<PPB_Graphics2D_Proxy, 68 pp::CompletionCallbackFactory<PPB_Graphics2D_Proxy,
65 ProxyNonThreadSafeRefCount> callback_factory_; 69 ProxyNonThreadSafeRefCount> callback_factory_;
66 70
67 DISALLOW_COPY_AND_ASSIGN(PPB_Graphics2D_Proxy); 71 DISALLOW_COPY_AND_ASSIGN(PPB_Graphics2D_Proxy);
68 }; 72 };
69 73
70 } // namespace proxy 74 } // namespace proxy
71 } // namespace ppapi 75 } // namespace ppapi
72 76
73 #endif // PPAPI_PPB_GRAPHICS_2D_PROXY_H_ 77 #endif // PPAPI_PPB_GRAPHICS_2D_PROXY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698