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

Unified Diff: content/browser/android/web_contents_observer_proxy.cc

Issue 2442303002: Adding new media controls to MediaNotification (Closed)
Patch Set: Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/android/web_contents_observer_proxy.cc
diff --git a/content/browser/android/web_contents_observer_proxy.cc b/content/browser/android/web_contents_observer_proxy.cc
index e42d6bd0b5c44cb483da5c5711afdae038a83421..79d474115fa8b8e2e92f2bf4f3baf7c34ba9260a 100644
--- a/content/browser/android/web_contents_observer_proxy.cc
+++ b/content/browser/android/web_contents_observer_proxy.cc
@@ -342,6 +342,26 @@ void WebContentsObserverProxy::MediaSessionMetadataChanged(
j_metadata);
}
+void WebContentsObserverProxy::MediaSessionEnabledAction(
+ blink::mojom::MediaSessionAction action) {
+ JNIEnv* env = AttachCurrentThread();
+
boliu 2016/10/24 17:02:46 nit: maybe could remove these empty lines? very mu
Zhiqiang Zhang (Slow) 2016/10/24 17:33:10 Done.
+ ScopedJavaLocalRef<jobject> obj(java_observer_);
+
+ Java_WebContentsObserverProxy_mediaSessionEnabledAction(
+ env, obj, static_cast<int>(action));
+}
+
+void WebContentsObserverProxy::MediaSessionDisabledAction(
+ blink::mojom::MediaSessionAction action) {
+ JNIEnv* env = AttachCurrentThread();
+
+ ScopedJavaLocalRef<jobject> obj(java_observer_);
+
+ Java_WebContentsObserverProxy_mediaSessionDisabledAction(
+ env, obj, static_cast<int>(action));
+}
+
void WebContentsObserverProxy::SetToBaseURLForDataURLIfNeeded(
std::string* url) {
NavigationEntry* entry =

Powered by Google App Engine
This is Rietveld 408576698