diff options
author | hans@chromium.org <hans@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-08-09 20:26:00 +0000 |
---|---|---|
committer | hans@chromium.org <hans@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-08-09 20:26:00 +0000 |
commit | 5f818b93158695864a8b8958e7f62b6a1741420f (patch) | |
tree | 043975106c1c6ecdca64ab7afec2e2753b4ceb68 /ui/views/controls/menu/menu.h | |
parent | afc4b1b17a512139e923f2b8b3aaeb7b72284b7f (diff) | |
download | chromium_src-5f818b93158695864a8b8958e7f62b6a1741420f.zip chromium_src-5f818b93158695864a8b8958e7f62b6a1741420f.tar.gz chromium_src-5f818b93158695864a8b8958e7f62b6a1741420f.tar.bz2 |
Clean-up inline members of nested classes (ui/)
Due to a bug, the Clang-plugin style checker failed to warn about
inline constructors, destructors, non-empty virtual methods, etc.
for nested classes.
The plugin has been fixed, and this patch is part of a clean-up of all
the code that now causes the plugin to issue errors.
BUG=139346
Review URL: https://chromiumcodereview.appspot.com/10831234
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@150877 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/views/controls/menu/menu.h')
-rw-r--r-- | ui/views/controls/menu/menu.h | 44 |
1 files changed, 11 insertions, 33 deletions
diff --git a/ui/views/controls/menu/menu.h b/ui/views/controls/menu/menu.h index 323657b..4736ae6 100644 --- a/ui/views/controls/menu/menu.h +++ b/ui/views/controls/menu/menu.h @@ -38,42 +38,28 @@ class VIEWS_EXPORT Menu { virtual ~Delegate() {} // Whether or not an item should be shown as checked. - virtual bool IsItemChecked(int id) const { - return false; - } + virtual bool IsItemChecked(int id) const; // Whether or not an item should be shown as the default (using bold). // There can only be one default menu item. - virtual bool IsItemDefault(int id) const { - return false; - } + virtual bool IsItemDefault(int id) const; // The string shown for the menu item. - virtual string16 GetLabel(int id) const { - return string16(); - } + virtual string16 GetLabel(int id) const; // The delegate needs to implement this function if it wants to display // the shortcut text next to each menu item. If there is an accelerator // for a given item id, the implementor must return it. - virtual bool GetAcceleratorInfo(int id, ui::Accelerator* accel) { - return false; - } + virtual bool GetAcceleratorInfo(int id, ui::Accelerator* accel); // The icon shown for the menu item. - virtual const gfx::ImageSkia& GetIcon(int id) const { - return GetEmptyIcon(); - } + virtual const gfx::ImageSkia& GetIcon(int id) const; // The number of items to show in the menu - virtual int GetItemCount() const { - return 0; - } + virtual int GetItemCount() const; // Whether or not an item is a separator. - virtual bool IsItemSeparator(int id) const { - return false; - } + virtual bool IsItemSeparator(int id) const; // Shows the context menu with the specified id. This is invoked when the // user does the appropriate gesture to show a context menu. The id @@ -89,9 +75,7 @@ class VIEWS_EXPORT Menu { } // Whether an item has an icon. - virtual bool HasIcon(int id) const { - return false; - } + virtual bool HasIcon(int id) const; // Notification that the menu is about to be popped up. virtual void MenuWillShow() { @@ -108,15 +92,9 @@ class VIEWS_EXPORT Menu { virtual bool IsRightToLeftUILayout() const; // Controller - virtual bool SupportsCommand(int id) const { - return true; - } - virtual bool IsCommandEnabled(int id) const { - return true; - } - virtual bool GetContextualLabel(int id, string16* out) const { - return false; - } + virtual bool SupportsCommand(int id) const; + virtual bool IsCommandEnabled(int id) const; + virtual bool GetContextualLabel(int id, string16* out) const; virtual void ExecuteCommand(int id) { } |