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

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

Issue 2528823002: Separate SwipeRefreshHandler and ContentViewCore (Closed)
Patch Set: Fix compile error in test case Created 4 years 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 598 matching lines...) Expand 10 before | Expand all | Expand 10 after
609 snapshot_callback); 609 snapshot_callback);
610 } 610 }
611 611
612 ScopedJavaLocalRef<jstring> WebContentsAndroid::GetEncoding( 612 ScopedJavaLocalRef<jstring> WebContentsAndroid::GetEncoding(
613 JNIEnv* env, 613 JNIEnv* env,
614 const JavaParamRef<jobject>& obj) const { 614 const JavaParamRef<jobject>& obj) const {
615 return base::android::ConvertUTF8ToJavaString(env, 615 return base::android::ConvertUTF8ToJavaString(env,
616 web_contents_->GetEncoding()); 616 web_contents_->GetEncoding());
617 } 617 }
618 618
619 void WebContentsAndroid::SetOverscrollRefreshHandler(
620 JNIEnv* env,
621 const base::android::JavaParamRef<jobject>& obj,
622 jlong overscroll_refresh_handler_ptr) {
623 WebContentsViewAndroid* view =
624 static_cast<WebContentsViewAndroid*>(web_contents_->GetView());
625 view->SetOverscrollRefreshHandler(
626 reinterpret_cast<ui::OverscrollRefreshHandler*>(
627 overscroll_refresh_handler_ptr));
628 }
629
619 void WebContentsAndroid::GetContentBitmap( 630 void WebContentsAndroid::GetContentBitmap(
620 JNIEnv* env, 631 JNIEnv* env,
621 const JavaParamRef<jobject>& obj, 632 const JavaParamRef<jobject>& obj,
622 const JavaParamRef<jobject>& jcallback, 633 const JavaParamRef<jobject>& jcallback,
623 const JavaParamRef<jobject>& color_type, 634 const JavaParamRef<jobject>& color_type,
624 jfloat scale, 635 jfloat scale,
625 jfloat x, 636 jfloat x,
626 jfloat y, 637 jfloat y,
627 jfloat width, 638 jfloat width,
628 jfloat height) { 639 jfloat height) {
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
723 env, *obj, *callback, id, http_status_code, jurl, jbitmaps, jsizes); 734 env, *obj, *callback, id, http_status_code, jurl, jbitmaps, jsizes);
724 } 735 }
725 736
726 void WebContentsAndroid::SetMediaSession( 737 void WebContentsAndroid::SetMediaSession(
727 const ScopedJavaLocalRef<jobject>& j_media_session) { 738 const ScopedJavaLocalRef<jobject>& j_media_session) {
728 JNIEnv* env = base::android::AttachCurrentThread(); 739 JNIEnv* env = base::android::AttachCurrentThread();
729 Java_WebContentsImpl_setMediaSession(env, obj_, j_media_session); 740 Java_WebContentsImpl_setMediaSession(env, obj_, j_media_session);
730 } 741 }
731 742
732 } // namespace content 743 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698