| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "content/renderer/pepper/pepper_plugin_delegate_impl.h" | 5 #include "content/renderer/pepper/pepper_plugin_delegate_impl.h" |
| 6 | 6 |
| 7 #include <cmath> | 7 #include <cmath> |
| 8 #include <cstddef> | 8 #include <cstddef> |
| 9 #include <map> | 9 #include <map> |
| 10 #include <queue> | 10 #include <queue> |
| (...skipping 579 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 590 } | 590 } |
| 591 | 591 |
| 592 uint32_t PepperPluginDelegateImpl::GetAudioHardwareOutputBufferSize() { | 592 uint32_t PepperPluginDelegateImpl::GetAudioHardwareOutputBufferSize() { |
| 593 return static_cast<uint32_t>(audio_hardware::GetOutputBufferSize()); | 593 return static_cast<uint32_t>(audio_hardware::GetOutputBufferSize()); |
| 594 } | 594 } |
| 595 | 595 |
| 596 webkit::ppapi::PluginDelegate::PlatformAudioOutput* | 596 webkit::ppapi::PluginDelegate::PlatformAudioOutput* |
| 597 PepperPluginDelegateImpl::CreateAudioOutput( | 597 PepperPluginDelegateImpl::CreateAudioOutput( |
| 598 uint32_t sample_rate, | 598 uint32_t sample_rate, |
| 599 uint32_t sample_count, | 599 uint32_t sample_count, |
| 600 webkit::ppapi::PluginDelegate::PlatformAudioCommonClient* client) { | 600 webkit::ppapi::PluginDelegate::PlatformAudioOutputClient* client) { |
| 601 return PepperPlatformAudioOutputImpl::Create( | 601 return PepperPlatformAudioOutputImpl::Create( |
| 602 static_cast<int>(sample_rate), static_cast<int>(sample_count), client); | 602 static_cast<int>(sample_rate), static_cast<int>(sample_count), client); |
| 603 } | 603 } |
| 604 | 604 |
| 605 webkit::ppapi::PluginDelegate::PlatformAudioInput* | 605 webkit::ppapi::PluginDelegate::PlatformAudioInput* |
| 606 PepperPluginDelegateImpl::CreateAudioInput( | 606 PepperPluginDelegateImpl::CreateAudioInput( |
| 607 const std::string& device_id, |
| 607 uint32_t sample_rate, | 608 uint32_t sample_rate, |
| 608 uint32_t sample_count, | 609 uint32_t sample_count, |
| 609 webkit::ppapi::PluginDelegate::PlatformAudioCommonClient* client) { | 610 webkit::ppapi::PluginDelegate::PlatformAudioInputClient* client) { |
| 610 return PepperPlatformAudioInputImpl::Create( | 611 return PepperPlatformAudioInputImpl::Create( |
| 611 static_cast<int>(sample_rate), static_cast<int>(sample_count), client); | 612 AsWeakPtr(), device_id, static_cast<int>(sample_rate), |
| 613 static_cast<int>(sample_count), client); |
| 612 } | 614 } |
| 613 | 615 |
| 614 // If a broker has not already been created for this plugin, creates one. | 616 // If a broker has not already been created for this plugin, creates one. |
| 615 webkit::ppapi::PluginDelegate::Broker* | 617 webkit::ppapi::PluginDelegate::Broker* |
| 616 PepperPluginDelegateImpl::ConnectToBroker( | 618 PepperPluginDelegateImpl::ConnectToBroker( |
| 617 webkit::ppapi::PPB_Broker_Impl* client) { | 619 webkit::ppapi::PPB_Broker_Impl* client) { |
| 618 DCHECK(client); | 620 DCHECK(client); |
| 619 | 621 |
| 620 // If a broker needs to be created, this will ensure it does not get deleted | 622 // If a broker needs to be created, this will ensure it does not get deleted |
| 621 // before Connect() adds a reference. | 623 // before Connect() adds a reference. |
| (...skipping 1024 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1646 render_view_->mouse_lock_dispatcher()->OnLockTargetDestroyed(target); | 1648 render_view_->mouse_lock_dispatcher()->OnLockTargetDestroyed(target); |
| 1647 delete target; | 1649 delete target; |
| 1648 mouse_lock_instances_.erase(it); | 1650 mouse_lock_instances_.erase(it); |
| 1649 } | 1651 } |
| 1650 } | 1652 } |
| 1651 | 1653 |
| 1652 webkit_glue::ClipboardClient* | 1654 webkit_glue::ClipboardClient* |
| 1653 PepperPluginDelegateImpl::CreateClipboardClient() const { | 1655 PepperPluginDelegateImpl::CreateClipboardClient() const { |
| 1654 return new RendererClipboardClient; | 1656 return new RendererClipboardClient; |
| 1655 } | 1657 } |
| OLD | NEW |