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/media_session_delegate_android.h" | 5 #include "content/browser/media/session/media_session_delegate_android.h" |
6 | 6 |
7 #include "base/android/context_utils.h" | 7 #include "base/android/context_utils.h" |
8 #include "base/android/jni_android.h" | 8 #include "base/android/jni_android.h" |
9 #include "jni/MediaSessionDelegate_jni.h" | 9 #include "jni/MediaSessionDelegate_jni.h" |
10 | 10 |
| 11 using base::android::JavaParamRef; |
| 12 |
11 namespace content { | 13 namespace content { |
12 | 14 |
13 // static | 15 // static |
14 bool MediaSessionDelegateAndroid::Register(JNIEnv* env) { | 16 bool MediaSessionDelegateAndroid::Register(JNIEnv* env) { |
15 return RegisterNativesImpl(env); | 17 return RegisterNativesImpl(env); |
16 } | 18 } |
17 | 19 |
18 MediaSessionDelegateAndroid::MediaSessionDelegateAndroid( | 20 MediaSessionDelegateAndroid::MediaSessionDelegateAndroid( |
19 MediaSession* media_session) | 21 MediaSession* media_session) |
20 : media_session_(media_session) { | 22 : media_session_(media_session) { |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 // static | 88 // static |
87 std::unique_ptr<MediaSessionDelegate> MediaSessionDelegate::Create( | 89 std::unique_ptr<MediaSessionDelegate> MediaSessionDelegate::Create( |
88 MediaSession* media_session) { | 90 MediaSession* media_session) { |
89 MediaSessionDelegateAndroid* delegate = | 91 MediaSessionDelegateAndroid* delegate = |
90 new MediaSessionDelegateAndroid(media_session); | 92 new MediaSessionDelegateAndroid(media_session); |
91 delegate->Initialize(); | 93 delegate->Initialize(); |
92 return std::unique_ptr<MediaSessionDelegate>(delegate); | 94 return std::unique_ptr<MediaSessionDelegate>(delegate); |
93 } | 95 } |
94 | 96 |
95 } // namespace content | 97 } // namespace content |
OLD | NEW |