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

Unified Diff: chrome/browser/ui/views/omnibox/omnibox_view_views.cc

Issue 9250016: Aura: Add "Edit Search Engines" option to the aura omnibox context menu. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 11 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
Index: chrome/browser/ui/views/omnibox/omnibox_view_views.cc
diff --git a/chrome/browser/ui/views/omnibox/omnibox_view_views.cc b/chrome/browser/ui/views/omnibox/omnibox_view_views.cc
index b0f6ac270cce6b9eb580ecb7dfd5917835d1cf9d..b1483ee92babe34268a90bd5110e9d6e652a6d18 100644
--- a/chrome/browser/ui/views/omnibox/omnibox_view_views.cc
+++ b/chrome/browser/ui/views/omnibox/omnibox_view_views.cc
@@ -30,6 +30,7 @@
#include "ui/base/dragdrop/os_exchange_data.h"
#include "ui/base/ime/text_input_type.h"
#include "ui/base/l10n/l10n_util.h"
+#include "ui/base/models/simple_menu_model.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/gfx/font.h"
#include "ui/gfx/render_text.h"
@@ -715,6 +716,20 @@ void OmniboxViewViews::OnWriteDragData(ui::OSExchangeData* data) {
data->SetURL(url, selected_text);
}
+void OmniboxViewViews::UpdateContextMenu(ui::SimpleMenuModel* menu_contents) {
+ DCHECK(menu_contents);
oshima 2012/01/18 22:24:24 you probably don't need this as it will crash on n
varunjain 2012/01/18 23:31:36 Done.
+ menu_contents->AddItemWithStringId(IDC_EDIT_SEARCH_ENGINES,
+ IDS_EDIT_SEARCH_ENGINES);
+}
+
+bool OmniboxViewViews::IsCommandIdEnabled(int command_id) const {
+ return command_updater_->IsCommandEnabled(command_id);
oshima 2012/01/18 22:24:24 There is a known issue that views cannot use IDC_
varunjain 2012/01/18 23:31:36 Done.
+}
+
+void OmniboxViewViews::ExecuteCommand(int command_id) {
+ command_updater_->ExecuteCommand(command_id);
+}
+
#if defined(OS_CHROMEOS)
void OmniboxViewViews::CandidateWindowOpened(
chromeos::input_method::InputMethodManager* manager) {

Powered by Google App Engine
This is Rietveld 408576698