| 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 #ifndef CHROME_BROWSER_UI_ANDROID_CONTEXT_MENU_HELPER_H_ | 5 #ifndef CHROME_BROWSER_UI_ANDROID_CONTEXT_MENU_HELPER_H_ |
| 6 #define CHROME_BROWSER_UI_ANDROID_CONTEXT_MENU_HELPER_H_ | 6 #define CHROME_BROWSER_UI_ANDROID_CONTEXT_MENU_HELPER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/android/jni_android.h" | 10 #include "base/android/jni_android.h" |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 | 28 |
| 29 bool ShowContextMenu(content::RenderFrameHost* render_frame_host, | 29 bool ShowContextMenu(content::RenderFrameHost* render_frame_host, |
| 30 const content::ContextMenuParams& params); | 30 const content::ContextMenuParams& params); |
| 31 | 31 |
| 32 void SetPopulator(jobject jpopulator); | 32 void SetPopulator(jobject jpopulator); |
| 33 | 33 |
| 34 // Methods called from Java via JNI ------------------------------------------ | 34 // Methods called from Java via JNI ------------------------------------------ |
| 35 void OnStartDownload(JNIEnv* env, | 35 void OnStartDownload(JNIEnv* env, |
| 36 const base::android::JavaParamRef<jobject>& obj, | 36 const base::android::JavaParamRef<jobject>& obj, |
| 37 jboolean jis_link, | 37 jboolean jis_link, |
| 38 const base::android::JavaParamRef<jstring>& jheaders); | 38 jboolean jis_data_reduction_proxy_enabled); |
| 39 void SearchForImage(JNIEnv* env, | 39 void SearchForImage(JNIEnv* env, |
| 40 const base::android::JavaParamRef<jobject>& obj); | 40 const base::android::JavaParamRef<jobject>& obj); |
| 41 void ShareImage(JNIEnv* env, const base::android::JavaParamRef<jobject>& obj); | 41 void ShareImage(JNIEnv* env, const base::android::JavaParamRef<jobject>& obj); |
| 42 | 42 |
| 43 private: | 43 private: |
| 44 explicit ContextMenuHelper(content::WebContents* web_contents); | 44 explicit ContextMenuHelper(content::WebContents* web_contents); |
| 45 friend class content::WebContentsUserData<ContextMenuHelper>; | 45 friend class content::WebContentsUserData<ContextMenuHelper>; |
| 46 | 46 |
| 47 static base::android::ScopedJavaLocalRef<jobject> CreateJavaContextMenuParams( | 47 static base::android::ScopedJavaLocalRef<jobject> CreateJavaContextMenuParams( |
| 48 const content::ContextMenuParams& params); | 48 const content::ContextMenuParams& params); |
| 49 | 49 |
| 50 void OnShareImage(const std::string& thumbnail_data, | 50 void OnShareImage(const std::string& thumbnail_data, |
| 51 const gfx::Size& original_size); | 51 const gfx::Size& original_size); |
| 52 | 52 |
| 53 base::android::ScopedJavaGlobalRef<jobject> java_obj_; | 53 base::android::ScopedJavaGlobalRef<jobject> java_obj_; |
| 54 content::WebContents* web_contents_; | 54 content::WebContents* web_contents_; |
| 55 | 55 |
| 56 content::ContextMenuParams context_menu_params_; | 56 content::ContextMenuParams context_menu_params_; |
| 57 int render_frame_id_; | 57 int render_frame_id_; |
| 58 int render_process_id_; | 58 int render_process_id_; |
| 59 | 59 |
| 60 DISALLOW_COPY_AND_ASSIGN(ContextMenuHelper); | 60 DISALLOW_COPY_AND_ASSIGN(ContextMenuHelper); |
| 61 }; | 61 }; |
| 62 | 62 |
| 63 bool RegisterContextMenuHelper(JNIEnv* env); | 63 bool RegisterContextMenuHelper(JNIEnv* env); |
| 64 | 64 |
| 65 #endif // CHROME_BROWSER_UI_ANDROID_CONTEXT_MENU_HELPER_H_ | 65 #endif // CHROME_BROWSER_UI_ANDROID_CONTEXT_MENU_HELPER_H_ |
| OLD | NEW |