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

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

Issue 7623018: Move host resource from the proxy to the shared_impl. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comments addressed Created 9 years, 4 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_video_decoder_proxy.cc ('k') | ppapi/proxy/resource_creation_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_RESOURCE_CREATION_PROXY_H_ 5 #ifndef PPAPI_PROXY_RESOURCE_CREATION_PROXY_H_
6 #define PPAPI_PROXY_RESOURCE_CREATION_PROXY_H_ 6 #define PPAPI_PROXY_RESOURCE_CREATION_PROXY_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "ipc/ipc_channel.h" 11 #include "ipc/ipc_channel.h"
12 #include "ppapi/c/pp_bool.h" 12 #include "ppapi/c/pp_bool.h"
13 #include "ppapi/c/pp_instance.h" 13 #include "ppapi/c/pp_instance.h"
14 #include "ppapi/proxy/serialized_structs.h" 14 #include "ppapi/proxy/serialized_structs.h"
15 #include "ppapi/shared_impl/function_group_base.h" 15 #include "ppapi/shared_impl/function_group_base.h"
16 #include "ppapi/thunk/resource_creation_api.h" 16 #include "ppapi/thunk/resource_creation_api.h"
17 17
18 struct PP_Size; 18 struct PP_Size;
19 19
20 namespace ppapi {
21 class HostResource;
22 }
23
20 namespace pp { 24 namespace pp {
21 namespace proxy { 25 namespace proxy {
22 26
23 class HostResource;
24 class Dispatcher; 27 class Dispatcher;
25 28
26 class ResourceCreationProxy : public ::ppapi::FunctionGroupBase, 29 class ResourceCreationProxy : public ::ppapi::FunctionGroupBase,
27 public ::ppapi::thunk::ResourceCreationAPI, 30 public ::ppapi::thunk::ResourceCreationAPI,
28 public ::IPC::Channel::Listener, 31 public ::IPC::Channel::Listener,
29 public IPC::Message::Sender { 32 public IPC::Message::Sender {
30 public: 33 public:
31 explicit ResourceCreationProxy(Dispatcher* dispatcher); 34 explicit ResourceCreationProxy(Dispatcher* dispatcher);
32 virtual ~ResourceCreationProxy(); 35 virtual ~ResourceCreationProxy();
33 36
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 PP_Bool scroll_by_page) OVERRIDE; 128 PP_Bool scroll_by_page) OVERRIDE;
126 129
127 virtual bool Send(IPC::Message* msg) OVERRIDE; 130 virtual bool Send(IPC::Message* msg) OVERRIDE;
128 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; 131 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE;
129 132
130 private: 133 private:
131 // IPC message handlers (called in browser). 134 // IPC message handlers (called in browser).
132 void OnMsgCreateAudio(PP_Instance instance, 135 void OnMsgCreateAudio(PP_Instance instance,
133 int32_t sample_rate, 136 int32_t sample_rate,
134 uint32_t sample_frame_count, 137 uint32_t sample_frame_count,
135 HostResource* result); 138 ppapi::HostResource* result);
136 void OnMsgCreateGraphics2D(PP_Instance instance, 139 void OnMsgCreateGraphics2D(PP_Instance instance,
137 const PP_Size& size, 140 const PP_Size& size,
138 PP_Bool is_always_opaque, 141 PP_Bool is_always_opaque,
139 HostResource* result); 142 ppapi::HostResource* result);
140 void OnMsgCreateImageData(PP_Instance instance, 143 void OnMsgCreateImageData(PP_Instance instance,
141 int32_t format, 144 int32_t format,
142 const PP_Size& size, 145 const PP_Size& size,
143 PP_Bool init_to_zero, 146 PP_Bool init_to_zero,
144 HostResource* result, 147 ppapi::HostResource* result,
145 std::string* image_data_desc, 148 std::string* image_data_desc,
146 ImageHandle* result_image_handle); 149 ImageHandle* result_image_handle);
147 150
148 Dispatcher* dispatcher_; 151 Dispatcher* dispatcher_;
149 152
150 DISALLOW_COPY_AND_ASSIGN(ResourceCreationProxy); 153 DISALLOW_COPY_AND_ASSIGN(ResourceCreationProxy);
151 }; 154 };
152 155
153 } // namespace proxy 156 } // namespace proxy
154 } // namespace pp 157 } // namespace pp
155 158
156 #endif // PPAPI_PROXY_RESOURCE_CREATION_PROXY_H_ 159 #endif // PPAPI_PROXY_RESOURCE_CREATION_PROXY_H_
OLDNEW
« no previous file with comments | « ppapi/proxy/ppp_video_decoder_proxy.cc ('k') | ppapi/proxy/resource_creation_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698