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() {} |
}; |