OLD | NEW |
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 605 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
616 void WebContentsAndroid::SuspendMediaSession(JNIEnv* env, | 616 void WebContentsAndroid::SuspendMediaSession(JNIEnv* env, |
617 const JavaParamRef<jobject>& obj) { | 617 const JavaParamRef<jobject>& obj) { |
618 web_contents_->SuspendMediaSession(); | 618 web_contents_->SuspendMediaSession(); |
619 } | 619 } |
620 | 620 |
621 void WebContentsAndroid::StopMediaSession(JNIEnv* env, | 621 void WebContentsAndroid::StopMediaSession(JNIEnv* env, |
622 const JavaParamRef<jobject>& obj) { | 622 const JavaParamRef<jobject>& obj) { |
623 web_contents_->StopMediaSession(); | 623 web_contents_->StopMediaSession(); |
624 } | 624 } |
625 | 625 |
626 ScopedJavaLocalRef<jstring> WebContentsAndroid::GetEncoding( | |
627 JNIEnv* env, | |
628 const JavaParamRef<jobject>& obj) const { | |
629 return base::android::ConvertUTF8ToJavaString(env, | |
630 web_contents_->GetEncoding()); | |
631 } | |
632 | |
633 void WebContentsAndroid::GetContentBitmap( | 626 void WebContentsAndroid::GetContentBitmap( |
634 JNIEnv* env, | 627 JNIEnv* env, |
635 const JavaParamRef<jobject>& obj, | 628 const JavaParamRef<jobject>& obj, |
636 const JavaParamRef<jobject>& jcallback, | 629 const JavaParamRef<jobject>& jcallback, |
637 const JavaParamRef<jobject>& color_type, | 630 const JavaParamRef<jobject>& color_type, |
638 jfloat scale, | 631 jfloat scale, |
639 jfloat x, | 632 jfloat x, |
640 jfloat y, | 633 jfloat y, |
641 jfloat width, | 634 jfloat width, |
642 jfloat height) { | 635 jfloat height) { |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
732 } | 725 } |
733 for (const gfx::Size& size : sizes) { | 726 for (const gfx::Size& size : sizes) { |
734 Java_WebContentsImpl_createSizeAndAddToList( | 727 Java_WebContentsImpl_createSizeAndAddToList( |
735 env, jsizes.obj(), size.width(), size.height()); | 728 env, jsizes.obj(), size.width(), size.height()); |
736 } | 729 } |
737 Java_WebContentsImpl_onDownloadImageFinished( | 730 Java_WebContentsImpl_onDownloadImageFinished( |
738 env, obj->obj(), callback->obj(), id, | 731 env, obj->obj(), callback->obj(), id, |
739 http_status_code, jurl.obj(), jbitmaps.obj(), jsizes.obj()); | 732 http_status_code, jurl.obj(), jbitmaps.obj(), jsizes.obj()); |
740 } | 733 } |
741 } // namespace content | 734 } // namespace content |
OLD | NEW |