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

Side by Side Diff: ui/base/models/menu_model.h

Issue 11791039: Removes SimpleMenuModel::FlipIndex. It was only used by (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 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 | « chrome/browser/ui/views/frame/system_menu_model.cc ('k') | ui/base/models/simple_menu_model.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 UI_BASE_MODELS_MENU_MODEL_H_ 5 #ifndef UI_BASE_MODELS_MENU_MODEL_H_
6 #define UI_BASE_MODELS_MENU_MODEL_H_ 6 #define UI_BASE_MODELS_MENU_MODEL_H_
7 7
8 #include "base/string16.h" 8 #include "base/string16.h"
9 #include "ui/base/models/menu_model_delegate.h" 9 #include "ui/base/models/menu_model_delegate.h"
10 #include "ui/base/models/menu_separator_types.h" 10 #include "ui/base/models/menu_separator_types.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 // triggering a custom rendering mode. 43 // triggering a custom rendering mode.
44 virtual bool HasIcons() const = 0; 44 virtual bool HasIcons() const = 0;
45 45
46 // Returns the index of the first item. This is 0 for most menus except the 46 // Returns the index of the first item. This is 0 for most menus except the
47 // system menu on Windows. |native_menu| is the menu to locate the start index 47 // system menu on Windows. |native_menu| is the menu to locate the start index
48 // within. It is guaranteed to be reset to a clean default state. Some 48 // within. It is guaranteed to be reset to a clean default state. Some
49 // callers of this method may pass NULL for native_menu. 49 // callers of this method may pass NULL for native_menu.
50 // IMPORTANT: If the model implementation returns something _other_ than 0 50 // IMPORTANT: If the model implementation returns something _other_ than 0
51 // here, it must offset the values for |index| it passes to the 51 // here, it must offset the values for |index| it passes to the
52 // methods below by this number - this is NOT done automatically! 52 // methods below by this number - this is NOT done automatically!
53 // TODO(sky): remove this from MenuModel. It's confusing.
53 virtual int GetFirstItemIndex(gfx::NativeMenu native_menu) const; 54 virtual int GetFirstItemIndex(gfx::NativeMenu native_menu) const;
54 55
55 // Returns the number of items in the menu. 56 // Returns the number of items in the menu.
56 virtual int GetItemCount() const = 0; 57 virtual int GetItemCount() const = 0;
57 58
58 // Returns the type of item at the specified index. 59 // Returns the type of item at the specified index.
59 virtual ItemType GetTypeAt(int index) const = 0; 60 virtual ItemType GetTypeAt(int index) const = 0;
60 61
61 // Returns the separator type at the specified index. 62 // Returns the separator type at the specified index.
62 virtual ui::MenuSeparatorType GetSeparatorTypeAt(int index) const = 0; 63 virtual ui::MenuSeparatorType GetSeparatorTypeAt(int index) const = 0;
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 // Retrieves the model and index that contains a specific command id. Returns 133 // Retrieves the model and index that contains a specific command id. Returns
133 // true if an item with the specified command id is found. |model| is inout, 134 // true if an item with the specified command id is found. |model| is inout,
134 // and specifies the model to start searching from. 135 // and specifies the model to start searching from.
135 static bool GetModelAndIndexForCommandId(int command_id, MenuModel** model, 136 static bool GetModelAndIndexForCommandId(int command_id, MenuModel** model,
136 int* index); 137 int* index);
137 }; 138 };
138 139
139 } // namespace ui 140 } // namespace ui
140 141
141 #endif // UI_BASE_MODELS_MENU_MODEL_H_ 142 #endif // UI_BASE_MODELS_MENU_MODEL_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/frame/system_menu_model.cc ('k') | ui/base/models/simple_menu_model.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698