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

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

Issue 10824402: Convert ui::MenuModel to use gfx::Image instead of ImageSkia. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Another day, another rebase 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/ui_export.h" 10 #include "ui/base/ui_export.h"
11 #include "ui/gfx/image/image_skia.h" 11 #include "ui/gfx/image/image_skia.h"
12 #include "ui/gfx/native_widget_types.h" 12 #include "ui/gfx/native_widget_types.h"
13 13
14 14
15 namespace gfx { 15 namespace gfx {
16 class Font; 16 class Font;
17 class ImageSkia; 17 class Image;
18 } 18 }
19 19
20 namespace ui { 20 namespace ui {
21 21
22 class Accelerator; 22 class Accelerator;
23 class ButtonMenuItemModel; 23 class ButtonMenuItemModel;
24 24
25 // An interface implemented by an object that provides the content of a menu. 25 // An interface implemented by an object that provides the content of a menu.
26 class UI_EXPORT MenuModel { 26 class UI_EXPORT MenuModel {
27 public: 27 public:
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 80
81 // Returns the checked state of the item at the specified index. 81 // Returns the checked state of the item at the specified index.
82 virtual bool IsItemCheckedAt(int index) const = 0; 82 virtual bool IsItemCheckedAt(int index) const = 0;
83 83
84 // Returns the id of the group of radio items that the item at the specified 84 // Returns the id of the group of radio items that the item at the specified
85 // index belongs to. 85 // index belongs to.
86 virtual int GetGroupIdAt(int index) const = 0; 86 virtual int GetGroupIdAt(int index) const = 0;
87 87
88 // Gets the icon for the item at the specified index, returning true if there 88 // Gets the icon for the item at the specified index, returning true if there
89 // is an icon, false otherwise. 89 // is an icon, false otherwise.
90 virtual bool GetIconAt(int index, gfx::ImageSkia* icon) = 0; 90 virtual bool GetIconAt(int index, gfx::Image* icon) = 0;
91 91
92 // Returns the model for a menu item with a line of buttons at |index|. 92 // Returns the model for a menu item with a line of buttons at |index|.
93 virtual ButtonMenuItemModel* GetButtonMenuItemAt(int index) const = 0; 93 virtual ButtonMenuItemModel* GetButtonMenuItemAt(int index) const = 0;
94 94
95 // Returns the enabled state of the item at the specified index. 95 // Returns the enabled state of the item at the specified index.
96 virtual bool IsEnabledAt(int index) const = 0; 96 virtual bool IsEnabledAt(int index) const = 0;
97 97
98 // Returns true if the menu item is visible. 98 // Returns true if the menu item is visible.
99 virtual bool IsVisibleAt(int index) const; 99 virtual bool IsVisibleAt(int index) const;
100 100
(...skipping 24 matching lines...) Expand all
125 // Retrieves the model and index that contains a specific command id. Returns 125 // 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, 126 // true if an item with the specified command id is found. |model| is inout,
127 // and specifies the model to start searching from. 127 // and specifies the model to start searching from.
128 static bool GetModelAndIndexForCommandId(int command_id, MenuModel** model, 128 static bool GetModelAndIndexForCommandId(int command_id, MenuModel** model,
129 int* index); 129 int* index);
130 }; 130 };
131 131
132 } // namespace ui 132 } // namespace ui
133 133
134 #endif // UI_BASE_MODELS_MENU_MODEL_H_ 134 #endif // UI_BASE_MODELS_MENU_MODEL_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/chromeos/login/network_dropdown.cc ('k') | ui/base/models/simple_menu_model.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698