Chromium Code Reviews

Side by Side Diff: content/browser/media/android/browser_media_session_manager.cc

Issue 1259633002: NOT FOR LANDING Implement WebMediaSession (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: hack until something works Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff |
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "content/browser/media/android/browser_media_session_manager.h"
6
7 #include "content/browser/media/android/media_session.h"
8 #include "content/public/browser/web_contents.h"
9
10 namespace content {
11
12 BrowserMediaSessionManager::BrowserMediaSessionManager(
13 RenderFrameHost* render_frame_host)
14 : render_frame_host_(render_frame_host) {
15 }
16
17 void BrowserMediaSessionManager::OnActivate(int session_id) {
18 WebContents* web_contents = WebContents::FromRenderFrameHost(
19 render_frame_host_);
20 MediaSession* media_session = MediaSession::Get(web_contents);
21 media_session->Activate();
22 }
23
24 void BrowserMediaSessionManager::OnDeactivate(int session_id) {
25 WebContents* web_contents = WebContents::FromRenderFrameHost(
26 render_frame_host_);
27 MediaSession* media_session = MediaSession::Get(web_contents);
28 media_session->Deactivate();
29 }
30
31 } // namespace content
OLDNEW

Powered by Google App Engine