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

Side by Side Diff: content/browser/media/session/pepper_player_delegate.cc

Issue 2526533002: Allow MediaSession in iframes to be routed (Closed)
Patch Set: addressed new commets from Anton Created 4 years 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 unified diff | Download patch
OLDNEW
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
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 return nullptr;
whywhat 2016/12/01 22:13:00 if pepper player's RFH is always null, why do we i
Zhiqiang Zhang (Slow) 2016/12/02 14:17:28 Ditto http://crbug.com/670273. Added a TODO here.
64 }
65
62 void PepperPlayerDelegate::SetVolume(int player_id, double volume) { 66 void PepperPlayerDelegate::SetVolume(int player_id, double volume) {
63 contents_->Send(new FrameMsg_SetPepperVolume( 67 contents_->Send(new FrameMsg_SetPepperVolume(
64 contents_->GetMainFrame()->routing_id(), pp_instance_, volume)); 68 contents_->GetMainFrame()->routing_id(), pp_instance_, volume));
65 } 69 }
66 70
67 } // namespace content 71 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698