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

Side by Side Diff: content/browser/web_contents/web_contents_android.cc

Issue 2442303002: Adding new media controls to MediaNotification (Closed)
Patch Set: addressed boliu's comments 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
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/web_contents/web_contents_android.h" 5 #include "content/browser/web_contents/web_contents_android.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include "base/android/jni_android.h" 9 #include "base/android/jni_android.h"
10 #include "base/android/jni_array.h" 10 #include "base/android/jni_array.h"
(...skipping 610 matching lines...) Expand 10 before | Expand all | Expand 10 after
621 void WebContentsAndroid::SuspendMediaSession(JNIEnv* env, 621 void WebContentsAndroid::SuspendMediaSession(JNIEnv* env,
622 const JavaParamRef<jobject>& obj) { 622 const JavaParamRef<jobject>& obj) {
623 web_contents_->SuspendMediaSession(); 623 web_contents_->SuspendMediaSession();
624 } 624 }
625 625
626 void WebContentsAndroid::StopMediaSession(JNIEnv* env, 626 void WebContentsAndroid::StopMediaSession(JNIEnv* env,
627 const JavaParamRef<jobject>& obj) { 627 const JavaParamRef<jobject>& obj) {
628 web_contents_->StopMediaSession(); 628 web_contents_->StopMediaSession();
629 } 629 }
630 630
631 void WebContentsAndroid::DidReceiveMediaSessionAction(
632 JNIEnv* env,
633 const JavaParamRef<jobject>& obj,
634 int action) {
635 web_contents_->DidReceiveMediaSessionAction(
636 static_cast<blink::mojom::MediaSessionAction>(action));
637 }
638
631 ScopedJavaLocalRef<jstring> WebContentsAndroid::GetEncoding( 639 ScopedJavaLocalRef<jstring> WebContentsAndroid::GetEncoding(
632 JNIEnv* env, 640 JNIEnv* env,
633 const JavaParamRef<jobject>& obj) const { 641 const JavaParamRef<jobject>& obj) const {
634 return base::android::ConvertUTF8ToJavaString(env, 642 return base::android::ConvertUTF8ToJavaString(env,
635 web_contents_->GetEncoding()); 643 web_contents_->GetEncoding());
636 } 644 }
637 645
638 void WebContentsAndroid::GetContentBitmap( 646 void WebContentsAndroid::GetContentBitmap(
639 JNIEnv* env, 647 JNIEnv* env,
640 const JavaParamRef<jobject>& obj, 648 const JavaParamRef<jobject>& obj,
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
727 Java_WebContentsImpl_addToBitmapList(env, jbitmaps, jbitmap); 735 Java_WebContentsImpl_addToBitmapList(env, jbitmaps, jbitmap);
728 } 736 }
729 for (const gfx::Size& size : sizes) { 737 for (const gfx::Size& size : sizes) {
730 Java_WebContentsImpl_createSizeAndAddToList(env, jsizes, size.width(), 738 Java_WebContentsImpl_createSizeAndAddToList(env, jsizes, size.width(),
731 size.height()); 739 size.height());
732 } 740 }
733 Java_WebContentsImpl_onDownloadImageFinished( 741 Java_WebContentsImpl_onDownloadImageFinished(
734 env, *obj, *callback, id, http_status_code, jurl, jbitmaps, jsizes); 742 env, *obj, *callback, id, http_status_code, jurl, jbitmaps, jsizes);
735 } 743 }
736 } // namespace content 744 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698