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

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

Issue 10837317: Setting the touch wrench menu as default menu for ChromeOS (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed second review Created 8 years, 4 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
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/separator_types.h"
10 #include "ui/base/ui_export.h" 11 #include "ui/base/ui_export.h"
11 #include "ui/gfx/image/image_skia.h" 12 #include "ui/gfx/image/image_skia.h"
12 #include "ui/gfx/native_widget_types.h" 13 #include "ui/gfx/native_widget_types.h"
13 14
14 15
15 namespace gfx { 16 namespace gfx {
16 class Font; 17 class Font;
17 class ImageSkia; 18 class ImageSkia;
18 } 19 }
19 20
(...skipping 30 matching lines...) Expand all
50 // 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
51 // methods below by this number - this is NOT done automatically! 52 // methods below by this number - this is NOT done automatically!
52 virtual int GetFirstItemIndex(gfx::NativeMenu native_menu) const; 53 virtual int GetFirstItemIndex(gfx::NativeMenu native_menu) const;
53 54
54 // Returns the number of items in the menu. 55 // Returns the number of items in the menu.
55 virtual int GetItemCount() const = 0; 56 virtual int GetItemCount() const = 0;
56 57
57 // Returns the type of item at the specified index. 58 // Returns the type of item at the specified index.
58 virtual ItemType GetTypeAt(int index) const = 0; 59 virtual ItemType GetTypeAt(int index) const = 0;
59 60
61 // Returns the separator type at the specified index.
62 virtual ui::MenuSeparatorType GetSeparatorStyleAt(int index) const = 0;
sky 2012/08/21 19:36:29 Method should name return value: GetSeparatorTypeA
Mr4D (OOO till 08-26) 2012/08/21 21:34:54 Hmpf. In deed. Changed. (sorry missed that).
63
60 // Returns the command id of the item at the specified index. 64 // Returns the command id of the item at the specified index.
61 virtual int GetCommandIdAt(int index) const = 0; 65 virtual int GetCommandIdAt(int index) const = 0;
62 66
63 // Returns the label of the item at the specified index. 67 // Returns the label of the item at the specified index.
64 virtual string16 GetLabelAt(int index) const = 0; 68 virtual string16 GetLabelAt(int index) const = 0;
65 69
66 // Returns true if the menu item (label/icon) at the specified index can 70 // Returns true if the menu item (label/icon) at the specified index can
67 // change over the course of the menu's lifetime. If this function returns 71 // change over the course of the menu's lifetime. If this function returns
68 // true, the label and icon of the menu item will be updated each time the 72 // true, the label and icon of the menu item will be updated each time the
69 // menu is shown. 73 // menu is shown.
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 // Retrieves the model and index that contains a specific command id. Returns 129 // Retrieves the model and index that contains a specific command id. Returns
126 // true if an item with the specified command id is found. |model| is inout, 130 // true if an item with the specified command id is found. |model| is inout,
127 // and specifies the model to start searching from. 131 // and specifies the model to start searching from.
128 static bool GetModelAndIndexForCommandId(int command_id, MenuModel** model, 132 static bool GetModelAndIndexForCommandId(int command_id, MenuModel** model,
129 int* index); 133 int* index);
130 }; 134 };
131 135
132 } // namespace ui 136 } // namespace ui
133 137
134 #endif // UI_BASE_MODELS_MENU_MODEL_H_ 138 #endif // UI_BASE_MODELS_MENU_MODEL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698