| 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 CHROME_BROWSER_UI_TOOLBAR_BACK_FORWARD_MENU_MODEL_H_ | 5 #ifndef CHROME_BROWSER_UI_TOOLBAR_BACK_FORWARD_MENU_MODEL_H_ |
| 6 #define CHROME_BROWSER_UI_TOOLBAR_BACK_FORWARD_MENU_MODEL_H_ | 6 #define CHROME_BROWSER_UI_TOOLBAR_BACK_FORWARD_MENU_MODEL_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 virtual bool GetAcceleratorAt(int index, | 54 virtual bool GetAcceleratorAt(int index, |
| 55 ui::Accelerator* accelerator) const; | 55 ui::Accelerator* accelerator) const; |
| 56 virtual bool IsItemCheckedAt(int index) const; | 56 virtual bool IsItemCheckedAt(int index) const; |
| 57 virtual int GetGroupIdAt(int index) const; | 57 virtual int GetGroupIdAt(int index) const; |
| 58 virtual bool GetIconAt(int index, SkBitmap* icon); | 58 virtual bool GetIconAt(int index, SkBitmap* icon); |
| 59 virtual ui::ButtonMenuItemModel* GetButtonMenuItemAt(int index) const; | 59 virtual ui::ButtonMenuItemModel* GetButtonMenuItemAt(int index) const; |
| 60 virtual bool IsEnabledAt(int index) const; | 60 virtual bool IsEnabledAt(int index) const; |
| 61 virtual MenuModel* GetSubmenuModelAt(int index) const; | 61 virtual MenuModel* GetSubmenuModelAt(int index) const; |
| 62 virtual void HighlightChangedTo(int index); | 62 virtual void HighlightChangedTo(int index); |
| 63 virtual void ActivatedAt(int index); | 63 virtual void ActivatedAt(int index); |
| 64 virtual void ActivatedAtWithDisposition(int index, int disposition); | 64 virtual void ActivatedAtWithFlags(int index, int flags); |
| 65 virtual void MenuWillShow(); | 65 virtual void MenuWillShow(); |
| 66 | 66 |
| 67 // Is the item at |index| a separator? | 67 // Is the item at |index| a separator? |
| 68 bool IsSeparator(int index) const; | 68 bool IsSeparator(int index) const; |
| 69 | 69 |
| 70 // Set the delegate for triggering OnIconChanged. | 70 // Set the delegate for triggering OnIconChanged. |
| 71 virtual void SetMenuModelDelegate(ui::MenuModelDelegate* menu_model_delegate); | 71 virtual void SetMenuModelDelegate(ui::MenuModelDelegate* menu_model_delegate); |
| 72 | 72 |
| 73 protected: | 73 protected: |
| 74 ui::MenuModelDelegate* menu_model_delegate() { return menu_model_delegate_; } | 74 ui::MenuModelDelegate* menu_model_delegate() { return menu_model_delegate_; } |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 // Used for loading favicons from history. | 190 // Used for loading favicons from history. |
| 191 CancelableRequestConsumerTSimple<int> load_consumer_; | 191 CancelableRequestConsumerTSimple<int> load_consumer_; |
| 192 | 192 |
| 193 // Used for receiving notifications when an icon is changed. | 193 // Used for receiving notifications when an icon is changed. |
| 194 ui::MenuModelDelegate* menu_model_delegate_; | 194 ui::MenuModelDelegate* menu_model_delegate_; |
| 195 | 195 |
| 196 DISALLOW_COPY_AND_ASSIGN(BackForwardMenuModel); | 196 DISALLOW_COPY_AND_ASSIGN(BackForwardMenuModel); |
| 197 }; | 197 }; |
| 198 | 198 |
| 199 #endif // CHROME_BROWSER_UI_TOOLBAR_BACK_FORWARD_MENU_MODEL_H_ | 199 #endif // CHROME_BROWSER_UI_TOOLBAR_BACK_FORWARD_MENU_MODEL_H_ |
| OLD | NEW |