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

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

Issue 3143046: The "Update Chrome" menu item should appear in addition to the About menu. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: estade fixes -> final try Created 10 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 | « no previous file | app/menus/menu_model.cc » ('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) 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 APP_MENUS_MENU_MODEL_H_ 5 #ifndef APP_MENUS_MENU_MODEL_H_
6 #define APP_MENUS_MENU_MODEL_H_ 6 #define APP_MENUS_MENU_MODEL_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/scoped_ptr.h" 9 #include "base/scoped_ptr.h"
10 #include "base/string16.h" 10 #include "base/string16.h"
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 // Gets the icon for the item at the specified index, returning true if there 87 // Gets the icon for the item at the specified index, returning true if there
88 // is an icon, false otherwise. 88 // is an icon, false otherwise.
89 virtual bool GetIconAt(int index, SkBitmap* icon) const = 0; 89 virtual bool GetIconAt(int index, SkBitmap* icon) const = 0;
90 90
91 // Returns the model for a menu item with a line of buttons at |index|. 91 // Returns the model for a menu item with a line of buttons at |index|.
92 virtual ButtonMenuItemModel* GetButtonMenuItemAt(int index) const = 0; 92 virtual ButtonMenuItemModel* GetButtonMenuItemAt(int index) const = 0;
93 93
94 // Returns the enabled state of the item at the specified index. 94 // Returns the enabled state of the item at the specified index.
95 virtual bool IsEnabledAt(int index) const = 0; 95 virtual bool IsEnabledAt(int index) const = 0;
96 96
97 // Returns true if the menu item is visible.
98 virtual bool IsVisibleAt(int index) const;
99
97 // Returns the model for the submenu at the specified index. 100 // Returns the model for the submenu at the specified index.
98 virtual MenuModel* GetSubmenuModelAt(int index) const = 0; 101 virtual MenuModel* GetSubmenuModelAt(int index) const = 0;
99 102
100 // Called when the highlighted menu item changes to the item at the specified 103 // Called when the highlighted menu item changes to the item at the specified
101 // index. 104 // index.
102 virtual void HighlightChangedTo(int index) = 0; 105 virtual void HighlightChangedTo(int index) = 0;
103 106
104 // Called when the item at the specified index has been activated. 107 // Called when the item at the specified index has been activated.
105 virtual void ActivatedAt(int index) = 0; 108 virtual void ActivatedAt(int index) = 0;
106 109
107 // Called when the menu is about to be shown. 110 // Called when the menu is about to be shown.
108 virtual void MenuWillShow() {} 111 virtual void MenuWillShow() {}
109 112
110 // Retrieves the model and index that contains a specific command id. Returns 113 // Retrieves the model and index that contains a specific command id. Returns
111 // true if an item with the specified command id is found. |model| is inout, 114 // true if an item with the specified command id is found. |model| is inout,
112 // and specifies the model to start searching from. 115 // and specifies the model to start searching from.
113 static bool GetModelAndIndexForCommandId(int command_id, MenuModel** model, 116 static bool GetModelAndIndexForCommandId(int command_id, MenuModel** model,
114 int* index); 117 int* index);
115 }; 118 };
116 119
117 } // namespace 120 } // namespace
118 121
119 #endif // APP_MENUS_MENU_MODEL_H_ 122 #endif // APP_MENUS_MENU_MODEL_H_
OLDNEW
« no previous file with comments | « no previous file | app/menus/menu_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698