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

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

Issue 2407303005: Let embedder provide select action mode (Closed)
Patch Set: fixing tests 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 654 matching lines...) Expand 10 before | Expand all | Expand 10 after
665 return web_contents_->DownloadImage( 665 return web_contents_->DownloadImage(
666 url, is_fav_icon, max_bitmap_size, bypass_cache, 666 url, is_fav_icon, max_bitmap_size, bypass_cache,
667 base::Bind(&WebContentsAndroid::OnFinishDownloadImage, 667 base::Bind(&WebContentsAndroid::OnFinishDownloadImage,
668 weak_factory_.GetWeakPtr(), 668 weak_factory_.GetWeakPtr(),
669 base::Owned(new ScopedJavaGlobalRef<jobject>( 669 base::Owned(new ScopedJavaGlobalRef<jobject>(
670 env, obj)), 670 env, obj)),
671 base::Owned(new ScopedJavaGlobalRef<jobject>( 671 base::Owned(new ScopedJavaGlobalRef<jobject>(
672 env, jcallback)))); 672 env, jcallback))));
673 } 673 }
674 674
675 void WebContentsAndroid::DismissTextHandles(
676 JNIEnv* env,
677 const base::android::JavaParamRef<jobject>& obj) {
678 RenderWidgetHostViewAndroid* view = GetRenderWidgetHostViewAndroid();
679 if (view)
680 view->DismissTextHandles();
681 }
682
675 void WebContentsAndroid::OnFinishGetContentBitmap( 683 void WebContentsAndroid::OnFinishGetContentBitmap(
676 ScopedJavaGlobalRef<jobject>* obj, 684 ScopedJavaGlobalRef<jobject>* obj,
677 ScopedJavaGlobalRef<jobject>* callback, 685 ScopedJavaGlobalRef<jobject>* callback,
678 const SkBitmap& bitmap, 686 const SkBitmap& bitmap,
679 ReadbackResponse response) { 687 ReadbackResponse response) {
680 JNIEnv* env = base::android::AttachCurrentThread(); 688 JNIEnv* env = base::android::AttachCurrentThread();
681 ScopedJavaLocalRef<jobject> java_bitmap; 689 ScopedJavaLocalRef<jobject> java_bitmap;
682 if (response == READBACK_SUCCESS) 690 if (response == READBACK_SUCCESS)
683 java_bitmap = gfx::ConvertToJavaBitmap(&bitmap); 691 java_bitmap = gfx::ConvertToJavaBitmap(&bitmap);
684 Java_WebContentsImpl_onGetContentBitmapFinished(env, *obj, *callback, 692 Java_WebContentsImpl_onGetContentBitmapFinished(env, *obj, *callback,
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
716 env, *obj, *callback, id, http_status_code, jurl, jbitmaps, jsizes); 724 env, *obj, *callback, id, http_status_code, jurl, jbitmaps, jsizes);
717 } 725 }
718 726
719 void WebContentsAndroid::SetMediaSession( 727 void WebContentsAndroid::SetMediaSession(
720 const ScopedJavaLocalRef<jobject>& j_media_session) { 728 const ScopedJavaLocalRef<jobject>& j_media_session) {
721 JNIEnv* env = base::android::AttachCurrentThread(); 729 JNIEnv* env = base::android::AttachCurrentThread();
722 Java_WebContentsImpl_setMediaSession(env, obj_, j_media_session); 730 Java_WebContentsImpl_setMediaSession(env, obj_, j_media_session);
723 } 731 }
724 732
725 } // namespace content 733 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698