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

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

Issue 7740038: Use macros to define pepper interfaces (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: New patch 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"
14 #include "ppapi/proxy/serialized_structs.h" 15 #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 FunctionGroupBase, 28 class ResourceCreationProxy : public InterfaceProxy,
29 public thunk::ResourceCreationAPI, 29 public thunk::ResourceCreationAPI {
30 public IPC::Channel::Listener,
31 public IPC::Message::Sender {
32 public: 30 public:
33 explicit ResourceCreationProxy(Dispatcher* dispatcher); 31 explicit ResourceCreationProxy(Dispatcher* dispatcher);
34 virtual ~ResourceCreationProxy(); 32 virtual ~ResourceCreationProxy();
35 33
34 // Factory function used for registration (normal code can just use the
35 // constructor).
36 static InterfaceProxy* Create(Dispatcher* dispatcher);
37
36 virtual thunk::ResourceCreationAPI* AsResourceCreationAPI() OVERRIDE; 38 virtual thunk::ResourceCreationAPI* AsResourceCreationAPI() OVERRIDE;
37 39
38 // ResourceCreationAPI (called in plugin). 40 // ResourceCreationAPI (called in plugin).
39 virtual PP_Resource CreateAudio(PP_Instance instance, 41 virtual PP_Resource CreateAudio(PP_Instance instance,
40 PP_Resource config_id, 42 PP_Resource config_id,
41 PPB_Audio_Callback audio_callback, 43 PPB_Audio_Callback audio_callback,
42 void* user_data) OVERRIDE; 44 void* user_data) OVERRIDE;
43 virtual PP_Resource CreateAudioConfig(PP_Instance instance, 45 virtual PP_Resource CreateAudioConfig(PP_Instance instance,
44 PP_AudioSampleRate sample_rate, 46 PP_AudioSampleRate sample_rate,
45 uint32_t sample_frame_count) OVERRIDE; 47 uint32_t sample_frame_count) OVERRIDE;
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 PP_Bool is_always_opaque, 144 PP_Bool is_always_opaque,
143 HostResource* result); 145 HostResource* result);
144 void OnMsgCreateImageData(PP_Instance instance, 146 void OnMsgCreateImageData(PP_Instance instance,
145 int32_t format, 147 int32_t format,
146 const PP_Size& size, 148 const PP_Size& size,
147 PP_Bool init_to_zero, 149 PP_Bool init_to_zero,
148 HostResource* result, 150 HostResource* result,
149 std::string* image_data_desc, 151 std::string* image_data_desc,
150 ImageHandle* result_image_handle); 152 ImageHandle* result_image_handle);
151 153
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