| OLD | NEW |
| 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/base/ui_export.h" |
| 12 #include "ui/gfx/native_widget_types.h" | 13 #include "ui/gfx/native_widget_types.h" |
| 13 #include "ui/ui_api.h" | |
| 14 | 14 |
| 15 class SkBitmap; | 15 class SkBitmap; |
| 16 | 16 |
| 17 namespace gfx { | 17 namespace gfx { |
| 18 class Font; | 18 class Font; |
| 19 } | 19 } |
| 20 | 20 |
| 21 namespace ui { | 21 namespace ui { |
| 22 | 22 |
| 23 class Accelerator; | 23 class Accelerator; |
| 24 class ButtonMenuItemModel; | 24 class ButtonMenuItemModel; |
| 25 | 25 |
| 26 // 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. |
| 27 class UI_API MenuModel { | 27 class UI_EXPORT MenuModel { |
| 28 public: | 28 public: |
| 29 // The type of item. | 29 // The type of item. |
| 30 enum ItemType { | 30 enum ItemType { |
| 31 TYPE_COMMAND, | 31 TYPE_COMMAND, |
| 32 TYPE_CHECK, | 32 TYPE_CHECK, |
| 33 TYPE_RADIO, | 33 TYPE_RADIO, |
| 34 TYPE_SEPARATOR, | 34 TYPE_SEPARATOR, |
| 35 TYPE_BUTTON_ITEM, | 35 TYPE_BUTTON_ITEM, |
| 36 TYPE_SUBMENU | 36 TYPE_SUBMENU |
| 37 }; | 37 }; |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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_ |
| OLD | NEW |