| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/browser/media/session/pepper_player_delegate.h" | 5 #include "content/browser/media/session/pepper_player_delegate.h" |
| 6 | 6 |
| 7 #include "content/browser/frame_host/render_frame_host_impl.h" | 7 #include "content/browser/frame_host/render_frame_host_impl.h" |
| 8 #include "content/browser/media/session/pepper_playback_observer.h" | 8 #include "content/browser/media/session/pepper_playback_observer.h" |
| 9 #include "content/browser/web_contents/web_contents_impl.h" | 9 #include "content/browser/web_contents/web_contents_impl.h" |
| 10 #include "content/common/frame_messages.h" | 10 #include "content/common/frame_messages.h" |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 | 52 |
| 53 void PepperPlayerDelegate::OnSetVolumeMultiplier(int player_id, | 53 void PepperPlayerDelegate::OnSetVolumeMultiplier(int player_id, |
| 54 double volume_multiplier) { | 54 double volume_multiplier) { |
| 55 if (!ShouldDuckFlash()) | 55 if (!ShouldDuckFlash()) |
| 56 return; | 56 return; |
| 57 | 57 |
| 58 DCHECK_EQ(player_id, kPlayerId); | 58 DCHECK_EQ(player_id, kPlayerId); |
| 59 SetVolume(player_id, volume_multiplier); | 59 SetVolume(player_id, volume_multiplier); |
| 60 } | 60 } |
| 61 | 61 |
| 62 RenderFrameHost* PepperPlayerDelegate::GetRenderFrameHost() const { |
| 63 // TODO(zqzhang): Pepper player should be associated to a RenderFrameHost. |
| 64 return nullptr; |
| 65 } |
| 66 |
| 62 void PepperPlayerDelegate::SetVolume(int player_id, double volume) { | 67 void PepperPlayerDelegate::SetVolume(int player_id, double volume) { |
| 63 contents_->Send(new FrameMsg_SetPepperVolume( | 68 contents_->Send(new FrameMsg_SetPepperVolume( |
| 64 contents_->GetMainFrame()->routing_id(), pp_instance_, volume)); | 69 contents_->GetMainFrame()->routing_id(), pp_instance_, volume)); |
| 65 } | 70 } |
| 66 | 71 |
| 67 } // namespace content | 72 } // namespace content |
| OLD | NEW |