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

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

Issue 135813002: Revert of Merge NativeTextfieldViews into views::Textfield. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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/textfield.cc ('k') | ui/views/controls/textfield/textfield_controller.cc » ('j') | 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 be9b9389f808bf1599b2ceaf17b0b6dc557525c8..bebec1c298d36ddf17d90d08b68f86cc4fc10362 100644
--- a/ui/views/controls/textfield/textfield_controller.h
+++ b/ui/views/controls/textfield/textfield_controller.h
@@ -79,6 +79,26 @@
// 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;
+
+ // Returns true if the item label for the |command_id| is dynamic in the
+ // context menu.
+ virtual bool IsItemForCommandIdDynamic(int command_id) const;
+
+ // Returns the label string for the |coomand_id|.
+ virtual base::string16 GetLabelForCommandId(int command_id) const;
+
+ // Returns whether the controller handles the specified command. This is used
+ // to handle a command the textfield would normally handle. For example, to
+ // have the controller handle |IDS_APP_PASTE| override and return true if
+ // |command_id| == |IDS_APP_PASTE|.
+ // This is only invoked if the command is enabled.
+ virtual bool HandlesCommand(int command_id) const;
+
+ // Execute context menu command specified by |command_id|.
+ virtual void ExecuteCommand(int command_id, int event_flag) {}
+
protected:
virtual ~TextfieldController() {}
};
« no previous file with comments | « ui/views/controls/textfield/textfield.cc ('k') | ui/views/controls/textfield/textfield_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698