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

Side by Side Diff: ppapi/proxy/resource_creation_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/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/interface_proxy.h"
15 #include "ppapi/proxy/serialized_structs.h" 14 #include "ppapi/proxy/serialized_structs.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 { 20 namespace ppapi {
21 21
22 class HostResource; 22 class HostResource;
23 23
24 namespace proxy { 24 namespace proxy {
25 25
26 class Dispatcher; 26 class Dispatcher;
27 27
28 class ResourceCreationProxy : public InterfaceProxy, 28 class ResourceCreationProxy : public FunctionGroupBase,
29 public thunk::ResourceCreationAPI { 29 public thunk::ResourceCreationAPI,
30 public IPC::Channel::Listener,
31 public IPC::Message::Sender {
30 public: 32 public:
31 explicit ResourceCreationProxy(Dispatcher* dispatcher); 33 explicit ResourceCreationProxy(Dispatcher* dispatcher);
32 virtual ~ResourceCreationProxy(); 34 virtual ~ResourceCreationProxy();
33 35
34 // Factory function used for registration (normal code can just use the
35 // constructor).
36 static InterfaceProxy* Create(Dispatcher* dispatcher);
37
38 virtual thunk::ResourceCreationAPI* AsResourceCreationAPI() OVERRIDE; 36 virtual thunk::ResourceCreationAPI* AsResourceCreationAPI() OVERRIDE;
39 37
40 // ResourceCreationAPI (called in plugin). 38 // ResourceCreationAPI (called in plugin).
41 virtual PP_Resource CreateAudio(PP_Instance instance, 39 virtual PP_Resource CreateAudio(PP_Instance instance,
42 PP_Resource config_id, 40 PP_Resource config_id,
43 PPB_Audio_Callback audio_callback, 41 PPB_Audio_Callback audio_callback,
44 void* user_data) OVERRIDE; 42 void* user_data) OVERRIDE;
45 virtual PP_Resource CreateAudioConfig(PP_Instance instance, 43 virtual PP_Resource CreateAudioConfig(PP_Instance instance,
46 PP_AudioSampleRate sample_rate, 44 PP_AudioSampleRate sample_rate,
47 uint32_t sample_frame_count) OVERRIDE; 45 uint32_t sample_frame_count) OVERRIDE;
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 PP_Bool is_always_opaque, 142 PP_Bool is_always_opaque,
145 HostResource* result); 143 HostResource* result);
146 void OnMsgCreateImageData(PP_Instance instance, 144 void OnMsgCreateImageData(PP_Instance instance,
147 int32_t format, 145 int32_t format,
148 const PP_Size& size, 146 const PP_Size& size,
149 PP_Bool init_to_zero, 147 PP_Bool init_to_zero,
150 HostResource* result, 148 HostResource* result,
151 std::string* image_data_desc, 149 std::string* image_data_desc,
152 ImageHandle* result_image_handle); 150 ImageHandle* result_image_handle);
153 151
152 Dispatcher* dispatcher_;
153
154 DISALLOW_COPY_AND_ASSIGN(ResourceCreationProxy); 154 DISALLOW_COPY_AND_ASSIGN(ResourceCreationProxy);
155 }; 155 };
156 156
157 } // namespace proxy 157 } // namespace proxy
158 } // namespace ppapi 158 } // namespace ppapi
159 159
160 #endif // PPAPI_PROXY_RESOURCE_CREATION_PROXY_H_ 160 #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