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 <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 25 matching lines...) Expand all Loading... |
36 // Creates an Audio object in the plugin process. | 36 // Creates an Audio object in the plugin process. |
37 static PP_Resource CreateProxyResource(PP_Instance instance_id, | 37 static PP_Resource CreateProxyResource(PP_Instance instance_id, |
38 PP_Resource config_id, | 38 PP_Resource config_id, |
39 PPB_Audio_Callback audio_callback, | 39 PPB_Audio_Callback audio_callback, |
40 void* user_data); | 40 void* user_data); |
41 | 41 |
42 | 42 |
43 // InterfaceProxy implementation. | 43 // InterfaceProxy implementation. |
44 virtual bool OnMessageReceived(const IPC::Message& msg); | 44 virtual bool OnMessageReceived(const IPC::Message& msg); |
45 | 45 |
46 static const InterfaceID kInterfaceID = INTERFACE_ID_PPB_AUDIO; | 46 static const ApiID kApiID = API_ID_PPB_AUDIO; |
47 | 47 |
48 private: | 48 private: |
49 // Plugin->renderer message handlers. | 49 // Plugin->renderer message handlers. |
50 void OnMsgCreate(PP_Instance instance_id, | 50 void OnMsgCreate(PP_Instance instance_id, |
51 int32_t sample_rate, | 51 int32_t sample_rate, |
52 uint32_t sample_frame_count, | 52 uint32_t sample_frame_count, |
53 ppapi::HostResource* result); | 53 ppapi::HostResource* result); |
54 void OnMsgStartOrStop(const ppapi::HostResource& audio_id, bool play); | 54 void OnMsgStartOrStop(const ppapi::HostResource& audio_id, bool play); |
55 | 55 |
56 // Renderer->plugin message handlers. | 56 // Renderer->plugin message handlers. |
(...skipping 23 matching lines...) Expand all Loading... |
80 pp::CompletionCallbackFactory<PPB_Audio_Proxy, | 80 pp::CompletionCallbackFactory<PPB_Audio_Proxy, |
81 ProxyNonThreadSafeRefCount> callback_factory_; | 81 ProxyNonThreadSafeRefCount> callback_factory_; |
82 | 82 |
83 DISALLOW_COPY_AND_ASSIGN(PPB_Audio_Proxy); | 83 DISALLOW_COPY_AND_ASSIGN(PPB_Audio_Proxy); |
84 }; | 84 }; |
85 | 85 |
86 } // namespace proxy | 86 } // namespace proxy |
87 } // namespace ppapi | 87 } // namespace ppapi |
88 | 88 |
89 #endif // PPAPI_PROXY_PPB_AUDIO_PROXY_H_ | 89 #endif // PPAPI_PROXY_PPB_AUDIO_PROXY_H_ |
OLD | NEW |