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

Side by Side Diff: chrome/browser/gtk/menu_gtk.h

Issue 274040: More style nits. (Closed)
Patch Set: Created 11 years, 2 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
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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_GTK_MENU_GTK_H_ 5 #ifndef CHROME_BROWSER_GTK_MENU_GTK_H_
6 #define CHROME_BROWSER_GTK_MENU_GTK_H_ 6 #define CHROME_BROWSER_GTK_MENU_GTK_H_
7 7
8 #include <gtk/gtk.h> 8 #include <gtk/gtk.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 18 matching lines...) Expand all
29 29
30 // Returns whether this command is checked (for checkbox menu items only). 30 // Returns whether this command is checked (for checkbox menu items only).
31 virtual bool IsItemChecked(int command_id) const { return false; } 31 virtual bool IsItemChecked(int command_id) const { return false; }
32 32
33 // Executes the command. 33 // Executes the command.
34 virtual void ExecuteCommand(int command_id) = 0; 34 virtual void ExecuteCommand(int command_id) = 0;
35 35
36 // Called when the menu stops showing. This will be called along with 36 // Called when the menu stops showing. This will be called along with
37 // ExecuteCommand if the user clicks an item, but will also be called when 37 // ExecuteCommand if the user clicks an item, but will also be called when
38 // the user clicks away from the menu. 38 // the user clicks away from the menu.
39 virtual void StoppedShowing() { }; 39 virtual void StoppedShowing() { }
brettw 2009/10/14 02:08:51 Ditto
40 40
41 // Functions needed for creation of non-static menus. 41 // Functions needed for creation of non-static menus.
42 virtual int GetItemCount() const { return 0; } 42 virtual int GetItemCount() const { return 0; }
43 virtual bool IsItemSeparator(int command_id) const { return false; } 43 virtual bool IsItemSeparator(int command_id) const { return false; }
44 virtual std::string GetLabel(int command_id) const { return std::string(); } 44 virtual std::string GetLabel(int command_id) const { return std::string(); }
45 virtual bool HasIcon(int command_id) const { return false; } 45 virtual bool HasIcon(int command_id) const { return false; }
46 virtual const SkBitmap* GetIcon(int command_id) const { return NULL; } 46 virtual const SkBitmap* GetIcon(int command_id) const { return NULL; }
47 // Return true if we should override the "gtk-menu-images" system setting 47 // Return true if we should override the "gtk-menu-images" system setting
48 // when showing image menu items for this menu. 48 // when showing image menu items for this menu.
49 virtual bool AlwaysShowImages() const { return false; } 49 virtual bool AlwaysShowImages() const { return false; }
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 // menu. 151 // menu.
152 static bool block_activation_; 152 static bool block_activation_;
153 153
154 // We must free these at shutdown. 154 // We must free these at shutdown.
155 std::vector<MenuGtk*> submenus_we_own_; 155 std::vector<MenuGtk*> submenus_we_own_;
156 156
157 ScopedRunnableMethodFactory<MenuGtk> factory_; 157 ScopedRunnableMethodFactory<MenuGtk> factory_;
158 }; 158 };
159 159
160 #endif // CHROME_BROWSER_GTK_MENU_GTK_H_ 160 #endif // CHROME_BROWSER_GTK_MENU_GTK_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698