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

Unified Diff: chrome/browser/ui/android/context_menu_helper.h

Issue 2945903002: Rendering the image in the sandbox for security (Closed)
Patch Set: comments Created 3 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/android/context_menu_helper.h
diff --git a/chrome/browser/ui/android/context_menu_helper.h b/chrome/browser/ui/android/context_menu_helper.h
index 040e5bd902908de8534e3a5f3b938b00b21115f3..2d6b5b48a49ddb030c56e8de42a382f3551a30bc 100644
--- a/chrome/browser/ui/android/context_menu_helper.h
+++ b/chrome/browser/ui/android/context_menu_helper.h
@@ -12,6 +12,7 @@
#include "base/android/jni_android.h"
#include "base/android/scoped_java_ref.h"
#include "base/macros.h"
+#include "chrome/common/thumbnail_capturer.mojom.h"
#include "content/public/browser/web_contents_user_data.h"
#include "content/public/common/context_menu_params.h"
@@ -23,6 +24,13 @@ class WebContents;
class ContextMenuHelper
: public content::WebContentsUserData<ContextMenuHelper> {
+ protected:
+ using ImageRetrieveCallback = base::Callback<void(
+ chrome::mojom::ThumbnailCapturerPtr thumbnail_capturer_ptr,
+ const base::android::JavaRef<jobject>& jcallback,
+ const std::vector<uint8_t>& thumbnail_data,
+ const gfx::Size& max_dimen_px)>;
+
public:
~ContextMenuHelper() override;
@@ -42,10 +50,21 @@ class ContextMenuHelper
const base::android::JavaParamRef<jobject>& obj,
jboolean jis_link,
jboolean jis_data_reduction_proxy_enabled);
- void RetrieveImage(JNIEnv* env,
- const base::android::JavaParamRef<jobject>& obj,
- const base::android::JavaParamRef<jobject>& jcallback,
- jint max_dimen_px);
+ void RetrieveImageForShare(
+ JNIEnv* env,
+ const base::android::JavaParamRef<jobject>& obj,
+ const base::android::JavaParamRef<jobject>& jcallback,
+ jint max_dimen_px);
+ void RetrieveImageForContextMenu(
+ JNIEnv* env,
+ const base::android::JavaParamRef<jobject>& obj,
+ const base::android::JavaParamRef<jobject>& jcallback,
+ jint max_dimen_px);
+ void RetrieveImageInternal(
+ JNIEnv* env,
+ const ImageRetrieveCallback& retrieve_callback,
+ const base::android::JavaParamRef<jobject>& jcallback,
+ jint max_dimen_px);
void SearchForImage(JNIEnv* env,
const base::android::JavaParamRef<jobject>& obj);

Powered by Google App Engine
This is Rietveld 408576698