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

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

Issue 2360103002: Removing unnecessary context menu logic (Closed)
Patch Set: Added missing brace Created 4 years, 3 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 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 635 matching lines...) Expand 10 before | Expand all | Expand 10 after
646 if (!view->IsSurfaceAvailableForCopy()) { 646 if (!view->IsSurfaceAvailableForCopy()) {
647 result_callback.Run(SkBitmap(), READBACK_SURFACE_UNAVAILABLE); 647 result_callback.Run(SkBitmap(), READBACK_SURFACE_UNAVAILABLE);
648 return; 648 return;
649 } 649 }
650 view->GetScaledContentBitmap(scale, 650 view->GetScaledContentBitmap(scale,
651 pref_color_type, 651 pref_color_type,
652 gfx::Rect(x, y, width, height), 652 gfx::Rect(x, y, width, height),
653 result_callback); 653 result_callback);
654 } 654 }
655 655
656 void WebContentsAndroid::OnContextMenuClosed(JNIEnv* env,
657 const JavaParamRef<jobject>& obj) {
658 static_cast<WebContentsImpl*>(web_contents_)
659 ->NotifyContextMenuClosed(CustomContextMenuContext());
660 }
661
662 void WebContentsAndroid::ReloadLoFiImages(JNIEnv* env, 656 void WebContentsAndroid::ReloadLoFiImages(JNIEnv* env,
663 const JavaParamRef<jobject>& obj) { 657 const JavaParamRef<jobject>& obj) {
664 static_cast<WebContentsImpl*>(web_contents_)->ReloadLoFiImages(); 658 static_cast<WebContentsImpl*>(web_contents_)->ReloadLoFiImages();
665 } 659 }
666 660
667 int WebContentsAndroid::DownloadImage( 661 int WebContentsAndroid::DownloadImage(
668 JNIEnv* env, 662 JNIEnv* env,
669 const base::android::JavaParamRef<jobject>& obj, 663 const base::android::JavaParamRef<jobject>& obj,
670 const base::android::JavaParamRef<jstring>& jurl, 664 const base::android::JavaParamRef<jstring>& jurl,
671 jboolean is_fav_icon, 665 jboolean is_fav_icon,
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
720 Java_WebContentsImpl_addToBitmapList(env, jbitmaps, jbitmap); 714 Java_WebContentsImpl_addToBitmapList(env, jbitmaps, jbitmap);
721 } 715 }
722 for (const gfx::Size& size : sizes) { 716 for (const gfx::Size& size : sizes) {
723 Java_WebContentsImpl_createSizeAndAddToList(env, jsizes, size.width(), 717 Java_WebContentsImpl_createSizeAndAddToList(env, jsizes, size.width(),
724 size.height()); 718 size.height());
725 } 719 }
726 Java_WebContentsImpl_onDownloadImageFinished( 720 Java_WebContentsImpl_onDownloadImageFinished(
727 env, *obj, *callback, id, http_status_code, jurl, jbitmaps, jsizes); 721 env, *obj, *callback, id, http_status_code, jurl, jbitmaps, jsizes);
728 } 722 }
729 } // namespace content 723 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698