| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 APP_MENUS_MENU_MODEL_H_ | 5 #ifndef APP_MENUS_MENU_MODEL_H_ |
| 6 #define APP_MENUS_MENU_MODEL_H_ | 6 #define APP_MENUS_MENU_MODEL_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/scoped_ptr.h" | 9 #include "base/scoped_ptr.h" |
| 10 #include "base/string16.h" | 10 #include "base/string16.h" |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 // Called when the item at the specified index has been activated. | 108 // Called when the item at the specified index has been activated. |
| 109 virtual void ActivatedAt(int index) = 0; | 109 virtual void ActivatedAt(int index) = 0; |
| 110 | 110 |
| 111 // Called when the item has been activated with a given disposition (for the | 111 // Called when the item has been activated with a given disposition (for the |
| 112 // case where the activation involves a navigation). | 112 // case where the activation involves a navigation). |
| 113 virtual void ActivatedAtWithDisposition(int index, int disposition); | 113 virtual void ActivatedAtWithDisposition(int index, int disposition); |
| 114 | 114 |
| 115 // Called when the menu is about to be shown. | 115 // Called when the menu is about to be shown. |
| 116 virtual void MenuWillShow() {} | 116 virtual void MenuWillShow() {} |
| 117 | 117 |
| 118 // Called when the menu has been closed. |
| 119 virtual void MenuClosed() {} |
| 120 |
| 118 // Retrieves the model and index that contains a specific command id. Returns | 121 // Retrieves the model and index that contains a specific command id. Returns |
| 119 // true if an item with the specified command id is found. |model| is inout, | 122 // true if an item with the specified command id is found. |model| is inout, |
| 120 // and specifies the model to start searching from. | 123 // and specifies the model to start searching from. |
| 121 static bool GetModelAndIndexForCommandId(int command_id, MenuModel** model, | 124 static bool GetModelAndIndexForCommandId(int command_id, MenuModel** model, |
| 122 int* index); | 125 int* index); |
| 123 }; | 126 }; |
| 124 | 127 |
| 125 } // namespace | 128 } // namespace |
| 126 | 129 |
| 127 #endif // APP_MENUS_MENU_MODEL_H_ | 130 #endif // APP_MENUS_MENU_MODEL_H_ |
| OLD | NEW |