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

Side by Side Diff: content/public/android/java/src/org/chromium/content/browser/MediaSessionObserver.java

Issue 2439483003: Link MediaSessionTabHelper with native MediaSession [CL is going to be split] (Closed)
Patch Set: Don't review, this CL is getting huge and needs to be split Created 4 years, 1 month 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
(Empty)
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
3 // found in the LICENSE file.
4
5 package org.chromium.content.browser;
6
7 import org.chromium.content_public.common.MediaMetadata;
8
9 /**
10 * Java MediaSessionObserver. The observer is proxied via Java ChromeMediaSessio n and does not have
11 * a native counterpart.
12 */
13 public class MediaSessionObserver {
14 // The observed MediaSession.
15 private ChromeMediaSession mSession;
16
17 /**
18 * Create a MediaSessionObserver observing |session|.
19 */
20 public MediaSessionObserver(ChromeMediaSession session) {
21 session.addObserver(this);
22 mSession = session;
23 }
24
25 /**
26 * Get the observed MediaSession.
27 */
28 public final ChromeMediaSession getSession() {
29 return mSession;
30 }
31
32 /**
33 * Called when MediaSession is destroyed.
34 */
35 public void mediaSessionDestroyed() {}
36
37 /**
38 * Called when the native {@link MediaSession} state has changed.
39 * @param isControllable Whether the native {@link MediaSession} is controll able.
40 * @param isSuspended Whether the native {@link MediaSession} is suspended.
41 */
42 public void mediaSessionStateChanged(boolean isControllable, boolean isSuspe nded) {}
43
44 /**
45 * Called when the native {@link MediaSession} has changed metadata.
46 * @param metadata The new metadata of the native {@link MediaSession}. "nul l" is for unsetting
47 * metadata.
48 */
49 public void mediaSessionMetadataChanged(MediaMetadata metadata) {}
50 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698