| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "chrome/renderer/pepper_plugin_delegate_impl.h" | 5 #include "chrome/renderer/pepper_plugin_delegate_impl.h" |
| 6 | 6 |
| 7 #include "app/surface/transport_dib.h" | 7 #include "app/surface/transport_dib.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/scoped_ptr.h" | 9 #include "base/scoped_ptr.h" |
| 10 #include "chrome/common/render_messages.h" | 10 #include "chrome/common/render_messages.h" |
| 11 #include "chrome/renderer/audio_message_filter.h" | 11 #include "chrome/renderer/audio_message_filter.h" |
| 12 #include "chrome/renderer/render_view.h" | 12 #include "chrome/renderer/render_view.h" |
| 13 #include "third_party/WebKit/WebKit/chromium/public/WebFileChooserCompletion.h" |
| 14 #include "third_party/WebKit/WebKit/chromium/public/WebFileChooserParams.h" |
| 13 #include "webkit/glue/plugins/pepper_plugin_instance.h" | 15 #include "webkit/glue/plugins/pepper_plugin_instance.h" |
| 14 | 16 |
| 15 #if defined(OS_MACOSX) | 17 #if defined(OS_MACOSX) |
| 16 #include "chrome/common/render_messages.h" | 18 #include "chrome/common/render_messages.h" |
| 17 #include "chrome/renderer/render_thread.h" | 19 #include "chrome/renderer/render_thread.h" |
| 18 #endif | 20 #endif |
| 19 | 21 |
| 20 namespace { | 22 namespace { |
| 21 | 23 |
| 22 // Implements the Image2D using a TransportDIB. | 24 // Implements the Image2D using a TransportDIB. |
| (...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 267 pepper::PluginDelegate::PlatformAudio::Client* client) { | 269 pepper::PluginDelegate::PlatformAudio::Client* client) { |
| 268 scoped_ptr<PlatformAudioImpl> audio( | 270 scoped_ptr<PlatformAudioImpl> audio( |
| 269 new PlatformAudioImpl(render_view_->audio_message_filter())); | 271 new PlatformAudioImpl(render_view_->audio_message_filter())); |
| 270 if (audio->Initialize(sample_rate, sample_count, client)) { | 272 if (audio->Initialize(sample_rate, sample_count, client)) { |
| 271 return audio.release(); | 273 return audio.release(); |
| 272 } else { | 274 } else { |
| 273 return NULL; | 275 return NULL; |
| 274 } | 276 } |
| 275 } | 277 } |
| 276 | 278 |
| 279 bool PepperPluginDelegateImpl::RunFileChooser( |
| 280 const WebKit::WebFileChooserParams& params, |
| 281 WebKit::WebFileChooserCompletion* chooser_completion) { |
| 282 return render_view_->runFileChooser(params, chooser_completion); |
| 283 } |
| OLD | NEW |