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

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

Issue 22320004: Add a new parameter |latency| to PPB_Audio. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_PPB_AUDIO_PROXY_H_ 5 #ifndef PPAPI_PROXY_PPB_AUDIO_PROXY_H_
6 #define PPAPI_PROXY_PPB_AUDIO_PROXY_H_ 6 #define PPAPI_PROXY_PPB_AUDIO_PROXY_H_
7 7
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/memory/shared_memory.h" 11 #include "base/memory/shared_memory.h"
12 #include "base/sync_socket.h" 12 #include "base/sync_socket.h"
13 #include "ipc/ipc_platform_file.h" 13 #include "ipc/ipc_platform_file.h"
14 #include "ppapi/c/pp_instance.h" 14 #include "ppapi/c/pp_instance.h"
15 #include "ppapi/c/pp_resource.h" 15 #include "ppapi/c/pp_resource.h"
16 #include "ppapi/c/ppb_audio.h" 16 #include "ppapi/c/ppb_audio.h"
17 #include "ppapi/c/ppb_audio_config.h" 17 #include "ppapi/c/ppb_audio_config.h"
18 #include "ppapi/proxy/interface_proxy.h" 18 #include "ppapi/proxy/interface_proxy.h"
19 #include "ppapi/proxy/proxy_completion_callback_factory.h" 19 #include "ppapi/proxy/proxy_completion_callback_factory.h"
20 #include "ppapi/utility/completion_callback_factory.h" 20 #include "ppapi/utility/completion_callback_factory.h"
21 21
22 namespace ppapi { 22 namespace ppapi {
23 23
24 class AudioCallbackCombined;
24 class HostResource; 25 class HostResource;
25 26
26 namespace proxy { 27 namespace proxy {
27 28
28 class SerializedHandle; 29 class SerializedHandle;
29 30
30 class PPB_Audio_Proxy : public InterfaceProxy { 31 class PPB_Audio_Proxy : public InterfaceProxy {
31 public: 32 public:
32 PPB_Audio_Proxy(Dispatcher* dispatcher); 33 PPB_Audio_Proxy(Dispatcher* dispatcher);
33 virtual ~PPB_Audio_Proxy(); 34 virtual ~PPB_Audio_Proxy();
34 35
35 // Creates an Audio object in the plugin process. 36 // Creates an Audio object in the plugin process.
36 static PP_Resource CreateProxyResource(PP_Instance instance_id, 37 static PP_Resource CreateProxyResource(
37 PP_Resource config_id, 38 PP_Instance instance_id,
38 PPB_Audio_Callback audio_callback, 39 PP_Resource config_id,
39 void* user_data); 40 const AudioCallbackCombined& audio_callback,
40 41 void* user_data);
41 42
42 // InterfaceProxy implementation. 43 // InterfaceProxy implementation.
43 virtual bool OnMessageReceived(const IPC::Message& msg); 44 virtual bool OnMessageReceived(const IPC::Message& msg);
44 45
45 static const ApiID kApiID = API_ID_PPB_AUDIO; 46 static const ApiID kApiID = API_ID_PPB_AUDIO;
46 47
47 private: 48 private:
48 // Plugin->renderer message handlers. 49 // Plugin->renderer message handlers.
49 void OnMsgCreate(PP_Instance instance_id, 50 void OnMsgCreate(PP_Instance instance_id,
50 int32_t sample_rate, 51 int32_t sample_rate,
(...skipping 27 matching lines...) Expand all
78 79
79 ProxyCompletionCallbackFactory<PPB_Audio_Proxy> callback_factory_; 80 ProxyCompletionCallbackFactory<PPB_Audio_Proxy> callback_factory_;
80 81
81 DISALLOW_COPY_AND_ASSIGN(PPB_Audio_Proxy); 82 DISALLOW_COPY_AND_ASSIGN(PPB_Audio_Proxy);
82 }; 83 };
83 84
84 } // namespace proxy 85 } // namespace proxy
85 } // namespace ppapi 86 } // namespace ppapi
86 87
87 #endif // PPAPI_PROXY_PPB_AUDIO_PROXY_H_ 88 #endif // PPAPI_PROXY_PPB_AUDIO_PROXY_H_
OLDNEW
« no previous file with comments | « ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c ('k') | ppapi/proxy/ppb_audio_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698