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

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

Issue 4265002: Add proxies for ImageData and Graphics2D. These don't build by themselves, th... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 years, 1 month 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
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef PPAPI_PPB_GRAPHICS_2D_PROXY_H_
6 #define PPAPI_PPB_GRAPHICS_2D_PROXY_H_
7
8 #include "ppapi/c/pp_completion_callback.h"
9 #include "ppapi/c/pp_module.h"
10 #include "ppapi/c/pp_module.h"
11 #include "ppapi/c/pp_resource.h"
12 #include "ppapi/c/pp_size.h"
13 #include "ppapi/c/pp_var.h"
14 #include "ppapi/proxy/interface_proxy.h"
15
16 struct PPB_Graphics2D;
17 struct PP_Point;
18 struct PP_Rect;
19
20 namespace pp {
21 namespace proxy {
22
23 class PPB_Graphics2D_Proxy : public InterfaceProxy {
24 public:
25 PPB_Graphics2D_Proxy(Dispatcher* dispatcher, const void* target_interface);
26 virtual ~PPB_Graphics2D_Proxy();
27
28 const PPB_Graphics2D* ppb_graphics_2d_target() const {
29 return reinterpret_cast<const PPB_Graphics2D*>(target_interface());
piman 2010/11/03 22:53:49 static_cast should work when casting from void*
30 }
31
32 // InterfaceProxy implementation.
33 virtual const void* GetSourceInterface() const;
34 virtual InterfaceID GetInterfaceId() const;
35 virtual void OnMessageReceived(const IPC::Message& msg);
36
37 private:
38 // Message handlers.
39 void OnMsgCreate(PP_Module module,
40 const PP_Size& size,
41 bool is_always_opaque,
42 PP_Resource* result);
43 void OnMsgPaintImageData(PP_Resource graphics_2d,
44 PP_Resource image_data,
45 const PP_Point& top_left,
46 bool src_rect_specified,
47 const PP_Rect& src_rect);
48 void OnMsgScroll(PP_Resource graphics_2d,
49 bool clip_specified,
50 const PP_Rect& clip,
51 const PP_Point& amount);
52 void OnMsgReplaceContents(PP_Resource graphics_2d,
53 PP_Resource image_data);
54 void OnMsgFlush(PP_Resource graphics_2d,
55 uint32_t serialized_callback,
56 int32_t* result);
57 };
58
59 } // namespace proxy
60 } // namespace pp
61
62 #endif // PPAPI_PPB_GRAPHICS_2D_PROXY_H_
OLDNEW
« no previous file with comments | « no previous file | ppapi/proxy/ppb_graphics_2d_proxy.cc » ('j') | ppapi/proxy/ppb_graphics_2d_proxy.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698