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

Side by Side Diff: content/browser/media/android/media_session.h

Issue 1489453003: jni: Pass method parameters as JavaParamRef in content. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 2015 The Chromium Authors. All rights reserved. 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 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 #ifndef CONTENT_BROWSER_MEDIA_ANDROID_MEDIA_SESSION_H_ 5 #ifndef CONTENT_BROWSER_MEDIA_ANDROID_MEDIA_SESSION_H_
6 #define CONTENT_BROWSER_MEDIA_ANDROID_MEDIA_SESSION_H_ 6 #define CONTENT_BROWSER_MEDIA_ANDROID_MEDIA_SESSION_H_
7 7
8 #include <jni.h> 8 #include <jni.h>
9 9
10 #include "base/android/scoped_java_ref.h" 10 #include "base/android/scoped_java_ref.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 // Removes the given player from the current media session. Abandons audio 55 // Removes the given player from the current media session. Abandons audio
56 // focus if that was the last player in the session. 56 // focus if that was the last player in the session.
57 void RemovePlayer(MediaSessionObserver* observer, int player_id); 57 void RemovePlayer(MediaSessionObserver* observer, int player_id);
58 58
59 // Removes all the players associated with |observer|. Abandons audio focus if 59 // Removes all the players associated with |observer|. Abandons audio focus if
60 // these were the last players in the session. 60 // these were the last players in the session.
61 void RemovePlayers(MediaSessionObserver* observer); 61 void RemovePlayers(MediaSessionObserver* observer);
62 62
63 // Called when the Android system requests the MediaSession to be suspended. 63 // Called when the Android system requests the MediaSession to be suspended.
64 // Called by Java through JNI. 64 // Called by Java through JNI.
65 void OnSuspend(JNIEnv* env, jobject obj, jboolean temporary); 65 void OnSuspend(JNIEnv* env,
66 const base::android::JavaParamRef<jobject>& obj,
67 jboolean temporary);
66 68
67 // Called when the Android system requests the MediaSession to be resumed. 69 // Called when the Android system requests the MediaSession to be resumed.
68 // Called by Java through JNI. 70 // Called by Java through JNI.
69 void OnResume(JNIEnv* env, jobject obj); 71 void OnResume(JNIEnv* env, const base::android::JavaParamRef<jobject>& obj);
70 72
71 // Called when the user requests resuming the session. No-op if the session is 73 // Called when the user requests resuming the session. No-op if the session is
72 // not controllable. 74 // not controllable.
73 void Resume(); 75 void Resume();
74 76
75 // Called when the user requests suspending the session. No-op if the session 77 // Called when the user requests suspending the session. No-op if the session
76 // is not controllable. 78 // is not controllable.
77 void Suspend(); 79 void Suspend();
78 80
79 // Called when the user requests stopping the session. 81 // Called when the user requests stopping the session.
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 Type audio_focus_type_; 163 Type audio_focus_type_;
162 164
163 MediaSessionUmaHelper uma_helper_; 165 MediaSessionUmaHelper uma_helper_;
164 166
165 DISALLOW_COPY_AND_ASSIGN(MediaSession); 167 DISALLOW_COPY_AND_ASSIGN(MediaSession);
166 }; 168 };
167 169
168 } // namespace content 170 } // namespace content
169 171
170 #endif // CONTENT_BROWSER_MEDIA_ANDROID_MEDIA_SESSION_H_ 172 #endif // CONTENT_BROWSER_MEDIA_ANDROID_MEDIA_SESSION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698