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

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

Issue 12755019: Add 2-lines summary to CC/Address for Wallet items. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: DisplayNameLine2 -> DisplayNameDetail. Created 7 years, 9 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 | « components/autofill/browser/wallet/wallet_items.cc ('k') | ui/base/models/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) 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 51
52 // Returns the separator type at the specified index. 52 // Returns the separator type at the specified index.
53 virtual ui::MenuSeparatorType GetSeparatorTypeAt(int index) const = 0; 53 virtual ui::MenuSeparatorType GetSeparatorTypeAt(int index) const = 0;
54 54
55 // Returns the command id of the item at the specified index. 55 // Returns the command id of the item at the specified index.
56 virtual int GetCommandIdAt(int index) const = 0; 56 virtual int GetCommandIdAt(int index) const = 0;
57 57
58 // Returns the label of the item at the specified index. 58 // Returns the label of the item at the specified index.
59 virtual string16 GetLabelAt(int index) const = 0; 59 virtual string16 GetLabelAt(int index) const = 0;
60 60
61 // Returns true if the menu item (label/icon) at the specified index can 61 // Returns the sub-label of the item at the specified index.
sky 2013/03/14 19:54:17 You need a description of what a sub-label is and
aruslan 2013/03/14 20:52:13 Done.
62 // change over the course of the menu's lifetime. If this function returns 62 virtual string16 GetSubLabelAt(int index) const;
63 // true, the label and icon of the menu item will be updated each time the 63
64 // menu is shown. 64 // Returns true if the menu item (label/sub-label/icon) at the specified
65 // index can change over the course of the menu's lifetime. If this function
66 // returns true, the label and icon of the menu item will be updated each time
67 // the menu is shown.
65 virtual bool IsItemDynamicAt(int index) const = 0; 68 virtual bool IsItemDynamicAt(int index) const = 0;
66 69
67 // Returns the font use for the label at the specified index. 70 // Returns the font use for the label at the specified index.
68 // If NULL, then use default font. 71 // If NULL, then use default font.
69 virtual const gfx::Font* GetLabelFontAt(int index) const; 72 virtual const gfx::Font* GetLabelFontAt(int index) const;
70 73
74 // Returns the font use for the sub-label at the specified index.
75 // If NULL, then use default font.
76 virtual const gfx::Font* GetSubLabelFontAt(int index) const;
77
71 // Gets the acclerator information for the specified index, returning true if 78 // Gets the acclerator information for the specified index, returning true if
72 // there is a shortcut accelerator for the item, false otherwise. 79 // there is a shortcut accelerator for the item, false otherwise.
73 virtual bool GetAcceleratorAt(int index, 80 virtual bool GetAcceleratorAt(int index,
74 ui::Accelerator* accelerator) const = 0; 81 ui::Accelerator* accelerator) const = 0;
75 82
76 // Returns the checked state of the item at the specified index. 83 // Returns the checked state of the item at the specified index.
77 virtual bool IsItemCheckedAt(int index) const = 0; 84 virtual bool IsItemCheckedAt(int index) const = 0;
78 85
79 // Returns the id of the group of radio items that the item at the specified 86 // Returns the id of the group of radio items that the item at the specified
80 // index belongs to. 87 // index belongs to.
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 // true if an item with the specified command id is found. |model| is inout, 131 // true if an item with the specified command id is found. |model| is inout,
125 // and specifies the model to start searching from. 132 // and specifies the model to start searching from.
126 static bool GetModelAndIndexForCommandId(int command_id, 133 static bool GetModelAndIndexForCommandId(int command_id,
127 MenuModel** model, 134 MenuModel** model,
128 int* index); 135 int* index);
129 }; 136 };
130 137
131 } // namespace ui 138 } // namespace ui
132 139
133 #endif // UI_BASE_MODELS_MENU_MODEL_H_ 140 #endif // UI_BASE_MODELS_MENU_MODEL_H_
OLDNEW
« no previous file with comments | « components/autofill/browser/wallet/wallet_items.cc ('k') | ui/base/models/menu_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698