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

Side by Side Diff: chrome/browser/ui/android/context_menu_helper.h

Issue 2777773002: Show the image header for the Context Menu (Closed)
Patch Set: Why be public when you can be private Created 3 years, 8 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 #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 <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 27 matching lines...) Expand all
38 38
39 // Methods called from Java via JNI ------------------------------------------ 39 // Methods called from Java via JNI ------------------------------------------
40 void OnStartDownload(JNIEnv* env, 40 void OnStartDownload(JNIEnv* env,
41 const base::android::JavaParamRef<jobject>& obj, 41 const base::android::JavaParamRef<jobject>& obj,
42 jboolean jis_link, 42 jboolean jis_link,
43 jboolean jis_data_reduction_proxy_enabled); 43 jboolean jis_data_reduction_proxy_enabled);
44 void SearchForImage(JNIEnv* env, 44 void SearchForImage(JNIEnv* env,
45 const base::android::JavaParamRef<jobject>& obj); 45 const base::android::JavaParamRef<jobject>& obj);
46 void ShareImage(JNIEnv* env, const base::android::JavaParamRef<jobject>& obj); 46 void ShareImage(JNIEnv* env, const base::android::JavaParamRef<jobject>& obj);
47 47
48 void RetrieveHeaderThumbnail(JNIEnv* env,
49 const base::android::JavaParamRef<jobject>& obj,
50 jint j_max_size_px);
51
48 private: 52 private:
49 explicit ContextMenuHelper(content::WebContents* web_contents); 53 explicit ContextMenuHelper(content::WebContents* web_contents);
50 friend class content::WebContentsUserData<ContextMenuHelper>; 54 friend class content::WebContentsUserData<ContextMenuHelper>;
51 55
52 static base::android::ScopedJavaLocalRef<jobject> CreateJavaContextMenuParams( 56 static base::android::ScopedJavaLocalRef<jobject> CreateJavaContextMenuParams(
53 const content::ContextMenuParams& params); 57 const content::ContextMenuParams& params);
54 58
55 void OnShareImage(chrome::mojom::ThumbnailCapturerPtr thumbnail_capturer, 59 void OnShareImage(chrome::mojom::ThumbnailCapturerPtr thumbnail_capturer,
56 const std::vector<uint8_t>& thumbnail_data, 60 const std::vector<uint8_t>& thumbnail_data,
57 const gfx::Size& original_size); 61 const gfx::Size& original_size);
58 62
63 void OnHeaderThumbnailReceived(
64 chrome::mojom::ThumbnailCapturerPtr thumbnail_capturer,
65 const std::vector<uint8_t>& thumbnail_data,
66 const gfx::Size& original_size);
67
59 base::android::ScopedJavaGlobalRef<jobject> java_obj_; 68 base::android::ScopedJavaGlobalRef<jobject> java_obj_;
60 content::WebContents* web_contents_; 69 content::WebContents* web_contents_;
61 70
62 content::ContextMenuParams context_menu_params_; 71 content::ContextMenuParams context_menu_params_;
63 int render_frame_id_; 72 int render_frame_id_;
64 int render_process_id_; 73 int render_process_id_;
65 74
66 base::WeakPtrFactory<ContextMenuHelper> weak_factory_; 75 base::WeakPtrFactory<ContextMenuHelper> weak_factory_;
67 76
68 DISALLOW_COPY_AND_ASSIGN(ContextMenuHelper); 77 DISALLOW_COPY_AND_ASSIGN(ContextMenuHelper);
69 }; 78 };
70 79
71 bool RegisterContextMenuHelper(JNIEnv* env); 80 bool RegisterContextMenuHelper(JNIEnv* env);
72 81
73 #endif // CHROME_BROWSER_UI_ANDROID_CONTEXT_MENU_HELPER_H_ 82 #endif // CHROME_BROWSER_UI_ANDROID_CONTEXT_MENU_HELPER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698