OLD | NEW |
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_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 "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/shared_memory.h" | 9 #include "base/shared_memory.h" |
10 #include "base/sync_socket.h" | 10 #include "base/sync_socket.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 namespace pp { | 21 namespace pp { |
22 namespace proxy { | 22 namespace proxy { |
23 | 23 |
24 class HostResource; | 24 class HostResource; |
25 | 25 |
26 class PPB_Audio_Proxy : public InterfaceProxy { | 26 class PPB_Audio_Proxy : public InterfaceProxy { |
27 public: | 27 public: |
28 PPB_Audio_Proxy(Dispatcher* dispatcher, const void* target_interface); | 28 PPB_Audio_Proxy(Dispatcher* dispatcher, const void* target_interface); |
29 virtual ~PPB_Audio_Proxy(); | 29 virtual ~PPB_Audio_Proxy(); |
30 | 30 |
| 31 static const Info* GetInfo(); |
| 32 |
31 const PPB_Audio* ppb_audio_target() const { | 33 const PPB_Audio* ppb_audio_target() const { |
32 return static_cast<const PPB_Audio*>(target_interface()); | 34 return static_cast<const PPB_Audio*>(target_interface()); |
33 } | 35 } |
34 | 36 |
35 // InterfaceProxy implementation. | 37 // InterfaceProxy implementation. |
36 virtual const void* GetSourceInterface() const; | |
37 virtual InterfaceID GetInterfaceId() const; | |
38 virtual bool OnMessageReceived(const IPC::Message& msg); | 38 virtual bool OnMessageReceived(const IPC::Message& msg); |
39 | 39 |
40 private: | 40 private: |
41 // Plugin->renderer message handlers. | 41 // Plugin->renderer message handlers. |
42 void OnMsgCreate(PP_Instance instance_id, | 42 void OnMsgCreate(PP_Instance instance_id, |
43 const HostResource& config_id, | 43 const HostResource& config_id, |
44 HostResource* result); | 44 HostResource* result); |
45 void OnMsgStartOrStop(const HostResource& audio_id, bool play); | 45 void OnMsgStartOrStop(const HostResource& audio_id, bool play); |
46 | 46 |
47 // Renderer->plugin message handlers. | 47 // Renderer->plugin message handlers. |
(...skipping 23 matching lines...) Expand all Loading... |
71 CompletionCallbackFactory<PPB_Audio_Proxy, | 71 CompletionCallbackFactory<PPB_Audio_Proxy, |
72 ProxyNonThreadSafeRefCount> callback_factory_; | 72 ProxyNonThreadSafeRefCount> callback_factory_; |
73 | 73 |
74 DISALLOW_COPY_AND_ASSIGN(PPB_Audio_Proxy); | 74 DISALLOW_COPY_AND_ASSIGN(PPB_Audio_Proxy); |
75 }; | 75 }; |
76 | 76 |
77 } // namespace proxy | 77 } // namespace proxy |
78 } // namespace pp | 78 } // namespace pp |
79 | 79 |
80 #endif // PPAPI_PROXY_PPB_AUDIO_PROXY_H_ | 80 #endif // PPAPI_PROXY_PPB_AUDIO_PROXY_H_ |
OLD | NEW |