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

Side by Side Diff: chrome/browser/ui/ash/launcher/chrome_launcher_app_menu_item.h

Issue 538333002: gn/linux: warnings as errors, turn on Wextra (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 6 years, 3 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
« no previous file with comments | « build/secondary/third_party/libsrtp/BUILD.gn ('k') | content/common/cursors/webcursor.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_APP_MENU_ITEM_H_ 5 #ifndef CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_APP_MENU_ITEM_H_
6 #define CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_APP_MENU_ITEM_H_ 6 #define CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_APP_MENU_ITEM_H_
7 7
8 #include "base/strings/string16.h" 8 #include "base/strings/string16.h"
9 #include "ui/gfx/image/image.h" 9 #include "ui/gfx/image/image.h"
10 10
11 // A description for a menu item. It contains the menu item description as well 11 // A description for a menu item. It contains the menu item description as well
12 // as the function which gets executed upon menu item click. 12 // as the function which gets executed upon menu item click.
13 class ChromeLauncherAppMenuItem { 13 class ChromeLauncherAppMenuItem {
14 public: 14 public:
15 // To insert a separator before this item set |has_leading_separator|. 15 // To insert a separator before this item set |has_leading_separator|.
16 ChromeLauncherAppMenuItem(const base::string16 title, 16 ChromeLauncherAppMenuItem(const base::string16 title,
17 const gfx::Image* icon, 17 const gfx::Image* icon,
18 bool has_leading_separator); 18 bool has_leading_separator);
19 19
20 virtual ~ChromeLauncherAppMenuItem(); 20 virtual ~ChromeLauncherAppMenuItem();
21 21
22 // Retrieves the title for this menu option. 22 // Retrieves the title for this menu option.
23 const base::string16& title() const { return title_; } 23 const base::string16& title() const { return title_; }
24 24
25 // Retrieves the icon for this menu option. 25 // Retrieves the icon for this menu option.
26 const gfx::Image& icon() const { return icon_; } 26 const gfx::Image& icon() const { return icon_; }
27 27
28 // Returns true if a separator should be inserted before this item. 28 // Returns true if a separator should be inserted before this item.
29 const bool HasLeadingSeparator() const { return has_leading_separator_; } 29 bool HasLeadingSeparator() const { return has_leading_separator_; }
30 30
31 // Returns true if the item is active. 31 // Returns true if the item is active.
32 virtual bool IsActive() const; 32 virtual bool IsActive() const;
33 33
34 // Returns true if item is enabled. 34 // Returns true if item is enabled.
35 virtual bool IsEnabled() const; 35 virtual bool IsEnabled() const;
36 36
37 // Executes the option. 37 // Executes the option.
38 // |event_flags| are the flags from the event which issued this command. 38 // |event_flags| are the flags from the event which issued this command.
39 // It can be used to check additional keyboard modifiers. 39 // It can be used to check additional keyboard modifiers.
40 virtual void Execute(int event_flags); 40 virtual void Execute(int event_flags);
41 41
42 private: 42 private:
43 const base::string16 title_; 43 const base::string16 title_;
44 const gfx::Image icon_; 44 const gfx::Image icon_;
45 45
46 // True if the item has a separator in front of it. 46 // True if the item has a separator in front of it.
47 const bool has_leading_separator_; 47 const bool has_leading_separator_;
48 48
49 DISALLOW_COPY_AND_ASSIGN(ChromeLauncherAppMenuItem); 49 DISALLOW_COPY_AND_ASSIGN(ChromeLauncherAppMenuItem);
50 }; 50 };
51 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_APP_MENU_ITEM_H_ 51 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_APP_MENU_ITEM_H_
OLDNEW
« no previous file with comments | « build/secondary/third_party/libsrtp/BUILD.gn ('k') | content/common/cursors/webcursor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698