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

Unified Diff: webkit/plugins/ppapi/ppb_audio_impl.cc

Issue 6085009: Add an instance parameter to var objects, audio, and the 2D API. This replace... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 years, 12 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/client/plugin/pepper_view.cc ('k') | webkit/plugins/ppapi/ppb_graphics_2d_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/plugins/ppapi/ppb_audio_impl.cc
===================================================================
--- webkit/plugins/ppapi/ppb_audio_impl.cc (revision 70488)
+++ webkit/plugins/ppapi/ppb_audio_impl.cc (working copy)
@@ -19,11 +19,11 @@
uint32_t RecommendSampleFrameCount(uint32_t requested_sample_frame_count);
-PP_Resource CreateStereo16bit(PP_Module module_id,
+PP_Resource CreateStereo16bit(PP_Instance instance_id,
PP_AudioSampleRate_Dev sample_rate,
uint32_t sample_frame_count) {
- PluginModule* module = ResourceTracker::Get()->GetModule(module_id);
- if (!module)
+ PluginInstance* instance = ResourceTracker::Get()->GetInstance(instance_id);
+ if (!instance)
return 0;
// TODO(brettw): Currently we don't actually check what the hardware
@@ -38,7 +38,8 @@
return 0;
scoped_refptr<PPB_AudioConfig_Impl> config(
- new PPB_AudioConfig_Impl(module, sample_rate, sample_frame_count));
+ new PPB_AudioConfig_Impl(instance->module(), sample_rate,
+ sample_frame_count));
return config->GetReference();
}
@@ -102,7 +103,8 @@
}
PP_Resource GetCurrentConfig(PP_Resource audio_id) {
- scoped_refptr<PPB_Audio_Impl> audio = Resource::GetAs<PPB_Audio_Impl>(audio_id);
+ scoped_refptr<PPB_Audio_Impl> audio =
+ Resource::GetAs<PPB_Audio_Impl>(audio_id);
return audio ? audio->GetCurrentConfig() : 0;
}
@@ -132,7 +134,8 @@
PluginInstance* instance = ResourceTracker::Get()->GetInstance(instance_id);
if (!instance)
return 0;
- scoped_refptr<PPB_Audio_Impl> audio(new PPB_Audio_Impl(instance->module(), instance_id));
+ scoped_refptr<PPB_Audio_Impl> audio(
+ new PPB_Audio_Impl(instance->module(), instance_id));
return audio->GetReference();
}
« no previous file with comments | « remoting/client/plugin/pepper_view.cc ('k') | webkit/plugins/ppapi/ppb_graphics_2d_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698