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

Side by Side Diff: content/browser/android/web_contents_observer_proxy.cc

Issue 1159113006: [Android] A prototype of the interactive media notification. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Moved OnMediaSessionStateChanged to WebContentsImpl Created 5 years, 5 months 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 #include "content/browser/android/web_contents_observer_proxy.h" 5 #include "content/browser/android/web_contents_observer_proxy.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/android/jni_android.h" 9 #include "base/android/jni_android.h"
10 #include "base/android/jni_string.h" 10 #include "base/android/jni_string.h"
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 NavigationController::ReloadType reload_type) { 280 NavigationController::ReloadType reload_type) {
281 JNIEnv* env = AttachCurrentThread(); 281 JNIEnv* env = AttachCurrentThread();
282 ScopedJavaLocalRef<jobject> obj(java_observer_); 282 ScopedJavaLocalRef<jobject> obj(java_observer_);
283 ScopedJavaLocalRef<jstring> jstring_url( 283 ScopedJavaLocalRef<jstring> jstring_url(
284 ConvertUTF8ToJavaString(env, url.spec())); 284 ConvertUTF8ToJavaString(env, url.spec()));
285 285
286 Java_WebContentsObserverProxy_didStartNavigationToPendingEntry( 286 Java_WebContentsObserverProxy_didStartNavigationToPendingEntry(
287 env, obj.obj(), jstring_url.obj()); 287 env, obj.obj(), jstring_url.obj());
288 } 288 }
289 289
290 void WebContentsObserverProxy::MediaSessionStateChanged(bool is_controllable,
291 bool is_suspended) {
292 JNIEnv* env = AttachCurrentThread();
293
294 ScopedJavaLocalRef<jobject> obj(java_observer_);
295
296 Java_WebContentsObserverProxy_mediaSessionStateChanged(
297 env, obj.obj(), is_controllable, is_suspended);
298 }
299
290 bool RegisterWebContentsObserverProxy(JNIEnv* env) { 300 bool RegisterWebContentsObserverProxy(JNIEnv* env) {
291 return RegisterNativesImpl(env); 301 return RegisterNativesImpl(env);
292 } 302 }
293 } // namespace content 303 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/android/web_contents_observer_proxy.h ('k') | content/browser/media/android/browser_media_player_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698