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

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

Issue 1142863002: Remove support for custom menu items in context menus. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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
« no previous file with comments | « chrome/browser/ui/android/context_menu_helper.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/android/context_menu_helper.cc
diff --git a/chrome/browser/ui/android/context_menu_helper.cc b/chrome/browser/ui/android/context_menu_helper.cc
index 37519e1e3e994e47efd50567f5b8f15a152f12c0..fb7df2762d3996800e00beedf6b5ca56abf0d3f9 100644
--- a/chrome/browser/ui/android/context_menu_helper.cc
+++ b/chrome/browser/ui/android/context_menu_helper.cc
@@ -57,14 +57,6 @@ void ContextMenuHelper::ShowContextMenu(
ContextMenuHelper::CreateJavaContextMenuParams(params).obj());
}
-// Called to show a custom context menu. Used by the NTP.
-void ContextMenuHelper::ShowCustomContextMenu(
- const content::ContextMenuParams& params,
- const base::Callback<void(int)>& callback) {
- context_menu_callback_ = callback;
- ShowContextMenu(params);
-}
-
void ContextMenuHelper::SetPopulator(jobject jpopulator) {
JNIEnv* env = base::android::AttachCurrentThread();
Java_ContextMenuHelper_setPopulator(env, java_obj_.obj(), jpopulator);
@@ -99,27 +91,9 @@ ContextMenuHelper::CreateJavaContextMenuParams(
ConvertUTF8ToJavaString(env, sanitizedReferrer.spec()).obj(),
params.referrer_policy);
- std::vector<content::MenuItem>::const_iterator i;
- for (i = params.custom_items.begin(); i != params.custom_items.end(); ++i) {
- ContextMenuParamsAndroid::Java_ContextMenuParams_addCustomItem(
- env,
- jmenu_info.obj(),
- ConvertUTF16ToJavaString(env, i->label).obj(),
- i->action);
- }
-
return jmenu_info;
}
-void ContextMenuHelper::OnCustomItemSelected(JNIEnv* env,
- jobject obj,
- jint action) {
- if (!context_menu_callback_.is_null()) {
- context_menu_callback_.Run(action);
- context_menu_callback_.Reset();
- }
-}
-
void ContextMenuHelper::OnStartDownload(JNIEnv* env,
jobject obj,
jboolean jis_link) {
« no previous file with comments | « chrome/browser/ui/android/context_menu_helper.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698