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

Unified Diff: chrome/browser/ui/webui/ntp/android/context_menu_handler.cc

Issue 73173002: Add ContextMenu support upstream for Android (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years 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/webui/ntp/android/context_menu_handler.cc
diff --git a/chrome/browser/ui/webui/ntp/android/context_menu_handler.cc b/chrome/browser/ui/webui/ntp/android/context_menu_handler.cc
index 27f5dbccdafe1ba000adf90f583da3a745fa17db..7c916f4b976b369972ffe15f70cc1bb415868471 100644
--- a/chrome/browser/ui/webui/ntp/android/context_menu_handler.cc
+++ b/chrome/browser/ui/webui/ntp/android/context_menu_handler.cc
@@ -9,9 +9,9 @@
#include "base/strings/string16.h"
#include "base/strings/utf_string_conversions.h"
#include "base/values.h"
-#include "chrome/browser/android/tab_android.h"
#include "chrome/browser/prefs/incognito_mode_prefs.h"
#include "chrome/browser/profiles/profile.h"
+#include "chrome/browser/ui/android/context_menu_helper.h"
#include "chrome/common/pref_names.h"
#include "content/public/browser/user_metrics.h"
#include "content/public/browser/web_contents.h"
@@ -106,9 +106,10 @@ void ContextMenuHandler::HandleShowContextMenu(
menu.custom_items.push_back(menu_item);
}
- TabAndroid* tab = TabAndroid::FromWebContents(web_ui()->GetWebContents());
- if (tab) {
- tab->ShowCustomContextMenu(
+ ContextMenuHelper* context_menu_helper =
+ ContextMenuHelper::FromWebContents(web_ui()->GetWebContents());
+ if (context_menu_helper) {
+ context_menu_helper->ShowCustomContextMenu(
menu,
base::Bind(&ContextMenuHandler::OnItemSelected,
weak_ptr_factory_.GetWeakPtr()));
« no previous file with comments | « chrome/browser/ui/android/tab_contents/chrome_web_contents_view_delegate_android.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698