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

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: git rebase 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
48 private: 51 private:
49 explicit ContextMenuHelper(content::WebContents* web_contents); 52 explicit ContextMenuHelper(content::WebContents* web_contents);
50 friend class content::WebContentsUserData<ContextMenuHelper>; 53 friend class content::WebContentsUserData<ContextMenuHelper>;
51 54
52 static base::android::ScopedJavaLocalRef<jobject> CreateJavaContextMenuParams( 55 static base::android::ScopedJavaLocalRef<jobject> CreateJavaContextMenuParams(
53 const content::ContextMenuParams& params); 56 const content::ContextMenuParams& params);
54 57
55 void OnShareImage(chrome::mojom::ThumbnailCapturerPtr thumbnail_capturer, 58 void OnShareImage(chrome::mojom::ThumbnailCapturerPtr thumbnail_capturer,
56 const std::vector<uint8_t>& thumbnail_data, 59 const std::vector<uint8_t>& thumbnail_data,
57 const gfx::Size& original_size); 60 const gfx::Size& original_size);
58 61
62 void OnHeaderThumbnailReceived(
63 chrome::mojom::ThumbnailCapturerPtr thumbnail_capturer,
64 const std::vector<uint8_t>& thumbnail_data,
65 const gfx::Size& original_size);
66
59 base::android::ScopedJavaGlobalRef<jobject> java_obj_; 67 base::android::ScopedJavaGlobalRef<jobject> java_obj_;
60 content::WebContents* web_contents_; 68 content::WebContents* web_contents_;
61 69
62 content::ContextMenuParams context_menu_params_; 70 content::ContextMenuParams context_menu_params_;
63 int render_frame_id_; 71 int render_frame_id_;
64 int render_process_id_; 72 int render_process_id_;
65 73
66 base::WeakPtrFactory<ContextMenuHelper> weak_factory_; 74 base::WeakPtrFactory<ContextMenuHelper> weak_factory_;
67 75
68 DISALLOW_COPY_AND_ASSIGN(ContextMenuHelper); 76 DISALLOW_COPY_AND_ASSIGN(ContextMenuHelper);
69 }; 77 };
70 78
71 bool RegisterContextMenuHelper(JNIEnv* env); 79 bool RegisterContextMenuHelper(JNIEnv* env);
72 80
73 #endif // CHROME_BROWSER_UI_ANDROID_CONTEXT_MENU_HELPER_H_ 81 #endif // CHROME_BROWSER_UI_ANDROID_CONTEXT_MENU_HELPER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698