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

Unified Diff: ui/views/controls/textfield/textfield_controller.h

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: patch 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
« no previous file with comments | « ui/views/controls/textfield/native_textfield_views.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/textfield/textfield_controller.h
diff --git a/ui/views/controls/textfield/textfield_controller.h b/ui/views/controls/textfield/textfield_controller.h
index a831cbf4066ec257fd6f2584f51a30f4ccb46ac9..bc2e35fd60473d0c8f28fed0b1c2bb39742da90d 100644
--- a/ui/views/controls/textfield/textfield_controller.h
+++ b/ui/views/controls/textfield/textfield_controller.h
@@ -11,6 +11,7 @@
namespace ui {
class OSExchangeData;
+class SimpleMenuModel;
} // namespace ui
namespace views {
@@ -49,6 +50,15 @@ class VIEWS_EXPORT TextfieldController {
// chance to modify the drag data.
virtual void OnWriteDragData(ui::OSExchangeData* data) {}
+ // Gives the controller a chance to modify the context menu contents.
+ virtual void UpdateContextMenu(ui::SimpleMenuModel* menu_contents) {}
+
+ // Returns true if the |command_id| should be enabled in the context menu.
+ virtual bool IsCommandIdEnabled(int command_id) const { return false; }
+
+ // Execute context menu command specified by |command_id|.
+ virtual void ExecuteCommand(int command_id) {}
+
protected:
virtual ~TextfieldController() {}
};
« no previous file with comments | « ui/views/controls/textfield/native_textfield_views.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698