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

Side by Side Diff: app/menus/button_menu_item_model.h

Issue 3032024: Add undeclared virtual destructors part 2... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 5 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « app/active_window_watcher_x.h ('k') | chrome/common/deprecated/event_sys.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef APP_MENUS_BUTTON_MENU_ITEM_MODEL_H_ 5 #ifndef APP_MENUS_BUTTON_MENU_ITEM_MODEL_H_
6 #define APP_MENUS_BUTTON_MENU_ITEM_MODEL_H_ 6 #define APP_MENUS_BUTTON_MENU_ITEM_MODEL_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/string16.h" 10 #include "base/string16.h"
(...skipping 12 matching lines...) Expand all
23 }; 23 };
24 24
25 class Delegate { 25 class Delegate {
26 public: 26 public:
27 // Some command ids have labels that change over time. 27 // Some command ids have labels that change over time.
28 virtual bool IsLabelForCommandIdDynamic(int command_id) const; 28 virtual bool IsLabelForCommandIdDynamic(int command_id) const;
29 virtual string16 GetLabelForCommandId(int command_id) const; 29 virtual string16 GetLabelForCommandId(int command_id) const;
30 30
31 // Performs the action associated with the specified command id. 31 // Performs the action associated with the specified command id.
32 virtual void ExecuteCommand(int command_id) = 0; 32 virtual void ExecuteCommand(int command_id) = 0;
33
34 protected:
35 virtual ~Delegate() {}
33 }; 36 };
34 37
35 ButtonMenuItemModel(int string_id, ButtonMenuItemModel::Delegate* delegate); 38 ButtonMenuItemModel(int string_id, ButtonMenuItemModel::Delegate* delegate);
36 ~ButtonMenuItemModel(); 39 ~ButtonMenuItemModel();
37 40
38 // Adds a button that will emit |command_id|. All buttons created through 41 // Adds a button that will emit |command_id|. All buttons created through
39 // this method will have the same size, based on the largest button. 42 // this method will have the same size, based on the largest button.
40 void AddGroupItemWithStringId(int command_id, int string_id); 43 void AddGroupItemWithStringId(int command_id, int string_id);
41 44
42 // Adds a button that has an icon instead of a label. 45 // Adds a button that has an icon instead of a label.
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 std::vector<Item> items_; 89 std::vector<Item> items_;
87 90
88 Delegate* delegate_; 91 Delegate* delegate_;
89 92
90 DISALLOW_COPY_AND_ASSIGN(ButtonMenuItemModel); 93 DISALLOW_COPY_AND_ASSIGN(ButtonMenuItemModel);
91 }; 94 };
92 95
93 } // namespace menus 96 } // namespace menus
94 97
95 #endif // APP_MENUS_BUTTON_MENU_ITEM_MODEL_H_ 98 #endif // APP_MENUS_BUTTON_MENU_ITEM_MODEL_H_
OLDNEW
« no previous file with comments | « app/active_window_watcher_x.h ('k') | chrome/common/deprecated/event_sys.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698