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 #include "ppapi/proxy/ppb_audio_config_proxy.h" | 5 #include "ppapi/proxy/ppb_audio_config_proxy.h" |
6 | 6 |
7 #include "ppapi/c/ppb_audio_config.h" | 7 #include "ppapi/c/ppb_audio_config.h" |
8 #include "ppapi/proxy/plugin_dispatcher.h" | 8 #include "ppapi/proxy/plugin_dispatcher.h" |
9 #include "ppapi/proxy/plugin_resource.h" | 9 #include "ppapi/proxy/plugin_resource.h" |
10 #include "ppapi/proxy/ppapi_messages.h" | 10 #include "ppapi/proxy/ppapi_messages.h" |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 &CreateAudioConfigProxy, | 67 &CreateAudioConfigProxy, |
68 }; | 68 }; |
69 return &info; | 69 return &info; |
70 } | 70 } |
71 | 71 |
72 // static | 72 // static |
73 PP_Resource PPB_AudioConfig_Proxy::CreateProxyResource( | 73 PP_Resource PPB_AudioConfig_Proxy::CreateProxyResource( |
74 PP_Instance instance, | 74 PP_Instance instance, |
75 PP_AudioSampleRate sample_rate, | 75 PP_AudioSampleRate sample_rate, |
76 uint32_t sample_frame_count) { | 76 uint32_t sample_frame_count) { |
77 linked_ptr<AudioConfig> object(new AudioConfig( | 77 scoped_refptr<AudioConfig> object(new AudioConfig( |
78 HostResource::MakeInstanceOnly(instance))); | 78 HostResource::MakeInstanceOnly(instance))); |
79 if (!object->Init(sample_rate, sample_frame_count)) | 79 if (!object->Init(sample_rate, sample_frame_count)) |
80 return 0; | 80 return 0; |
81 return PluginResourceTracker::GetInstance()->AddResource(object); | 81 return PluginResourceTracker::GetInstance()->AddResource(object); |
82 } | 82 } |
83 | 83 |
84 bool PPB_AudioConfig_Proxy::OnMessageReceived(const IPC::Message& msg) { | 84 bool PPB_AudioConfig_Proxy::OnMessageReceived(const IPC::Message& msg) { |
85 // There are no IPC messages for this interface. | 85 // There are no IPC messages for this interface. |
86 NOTREACHED(); | 86 NOTREACHED(); |
87 return false; | 87 return false; |
88 } | 88 } |
89 | 89 |
90 } // namespace proxy | 90 } // namespace proxy |
91 } // namespace pp | 91 } // namespace pp |
OLD | NEW |