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

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

Issue 7328011: Introduce ui.dll / libui.so for the component build. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 5 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #pragma once 7 #pragma once
8 8
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/string16.h" 10 #include "base/string16.h"
11 #include "ui/base/models/menu_model_delegate.h" 11 #include "ui/base/models/menu_model_delegate.h"
12 #include "ui/gfx/native_widget_types.h" 12 #include "ui/gfx/native_widget_types.h"
13 #include "ui/ui_api.h"
13 14
14 class SkBitmap; 15 class SkBitmap;
15 16
16 namespace gfx { 17 namespace gfx {
17 class Font; 18 class Font;
18 } 19 }
19 20
20 namespace ui { 21 namespace ui {
21 22
22 class Accelerator; 23 class Accelerator;
23 class ButtonMenuItemModel; 24 class ButtonMenuItemModel;
24 25
25 // An interface implemented by an object that provides the content of a menu. 26 // An interface implemented by an object that provides the content of a menu.
26 class MenuModel { 27 class UI_API MenuModel {
27 public: 28 public:
28 // The type of item. 29 // The type of item.
29 enum ItemType { 30 enum ItemType {
30 TYPE_COMMAND, 31 TYPE_COMMAND,
31 TYPE_CHECK, 32 TYPE_CHECK,
32 TYPE_RADIO, 33 TYPE_RADIO,
33 TYPE_SEPARATOR, 34 TYPE_SEPARATOR,
34 TYPE_BUTTON_ITEM, 35 TYPE_BUTTON_ITEM,
35 TYPE_SUBMENU 36 TYPE_SUBMENU
36 }; 37 };
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 // 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
125 // 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,
126 // and specifies the model to start searching from. 127 // and specifies the model to start searching from.
127 static bool GetModelAndIndexForCommandId(int command_id, MenuModel** model, 128 static bool GetModelAndIndexForCommandId(int command_id, MenuModel** model,
128 int* index); 129 int* index);
129 }; 130 };
130 131
131 } // namespace ui 132 } // namespace ui
132 133
133 #endif // UI_BASE_MODELS_MENU_MODEL_H_ 134 #endif // UI_BASE_MODELS_MENU_MODEL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698