Chromium Code Reviews| Index: content/renderer/pepper_plugin_delegate_impl.cc |
| =================================================================== |
| --- content/renderer/pepper_plugin_delegate_impl.cc (revision 89207) |
| +++ content/renderer/pepper_plugin_delegate_impl.cc (working copy) |
| @@ -159,7 +159,7 @@ |
| public AudioMessageFilter::Delegate, |
| public base::RefCountedThreadSafe<PlatformAudioImpl> { |
| public: |
| - explicit PlatformAudioImpl(scoped_refptr<AudioMessageFilter> filter) |
| + explicit PlatformAudioImpl(AudioMessageFilter* filter) |
| : client_(NULL), filter_(filter), stream_id_(0), |
| main_message_loop_(MessageLoop::current()) { |
| DCHECK(filter_); |
| @@ -211,7 +211,8 @@ |
| // MessageFilter used to send/receive IPC. THIS MUST ONLY BE ACCESSED ON THE |
| // I/O thread except to send messages and get the message loop. |
| - scoped_refptr<AudioMessageFilter> filter_; |
| + // Cached result of Singleton<AudioMessageFilter>::get() to reduce overhead. |
| + AudioMessageFilter* filter_; |
| // Our ID on the MessageFilter. THIS MUST ONLY BE ACCESSED ON THE I/O THREAD |
| // or else you could race with the initialize function which sets it. |
| @@ -850,7 +851,7 @@ |
| uint32_t sample_rate, uint32_t sample_count, |
| webkit::ppapi::PluginDelegate::PlatformAudio::Client* client) { |
| scoped_refptr<PlatformAudioImpl> audio( |
| - new PlatformAudioImpl(render_view_->audio_message_filter())); |
| + new PlatformAudioImpl(AudioMessageFilter::GetInstance())); |
| if (audio->Initialize(sample_rate, sample_count, client)) { |
| // Balanced by Release invoked in PlatformAudioImpl::ShutDownOnIOThread(). |
| return audio.release(); |
| @@ -989,9 +990,9 @@ |
| return file_system_dispatcher->ReadDirectory(directory_path, dispatcher); |
| } |
| -class AsyncOpenFileSystemURLCallbackTranslator : |
| - public fileapi::FileSystemCallbackDispatcher { |
| -public: |
| +class AsyncOpenFileSystemURLCallbackTranslator |
| + : public fileapi::FileSystemCallbackDispatcher { |
|
scherkus (not reviewing)
2011/06/17 17:50:10
indentation
henrika_dont_use
2011/06/21 16:43:38
Done.
|
| + public: |
| AsyncOpenFileSystemURLCallbackTranslator( |
| webkit::ppapi::PluginDelegate::AsyncOpenFileCallback* callback) |
| : callback_(callback) { |