| 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 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 <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 // MenuModel implementation. | 41 // MenuModel implementation. |
| 42 virtual bool HasIcons() const; | 42 virtual bool HasIcons() const; |
| 43 // Returns how many items the menu should show, including history items, | 43 // Returns how many items the menu should show, including history items, |
| 44 // chapter-stops, separators and the Show Full History link. This function | 44 // chapter-stops, separators and the Show Full History link. This function |
| 45 // uses GetHistoryItemCount() and GetChapterStopCount() internally to figure | 45 // uses GetHistoryItemCount() and GetChapterStopCount() internally to figure |
| 46 // out the total number of items to show. | 46 // out the total number of items to show. |
| 47 virtual int GetItemCount() const; | 47 virtual int GetItemCount() const; |
| 48 virtual ItemType GetTypeAt(int index) const; | 48 virtual ItemType GetTypeAt(int index) const; |
| 49 virtual int GetCommandIdAt(int index) const; | 49 virtual int GetCommandIdAt(int index) const; |
| 50 virtual string16 GetLabelAt(int index) const; | 50 virtual string16 GetLabelAt(int index) const; |
| 51 virtual bool IsLabelDynamicAt(int index) const; | 51 virtual bool IsItemDynamicAt(int index) const; |
| 52 virtual bool GetAcceleratorAt(int index, | 52 virtual bool GetAcceleratorAt(int index, |
| 53 menus::Accelerator* accelerator) const; | 53 menus::Accelerator* accelerator) const; |
| 54 virtual bool IsItemCheckedAt(int index) const; | 54 virtual bool IsItemCheckedAt(int index) const; |
| 55 virtual int GetGroupIdAt(int index) const; | 55 virtual int GetGroupIdAt(int index) const; |
| 56 virtual bool GetIconAt(int index, SkBitmap* icon) const; | 56 virtual bool GetIconAt(int index, SkBitmap* icon) const; |
| 57 virtual menus::ButtonMenuItemModel* GetButtonMenuItemAt(int index) const; | 57 virtual menus::ButtonMenuItemModel* GetButtonMenuItemAt(int index) const; |
| 58 virtual bool IsEnabledAt(int index) const; | 58 virtual bool IsEnabledAt(int index) const; |
| 59 virtual MenuModel* GetSubmenuModelAt(int index) const; | 59 virtual MenuModel* GetSubmenuModelAt(int index) const; |
| 60 virtual void HighlightChangedTo(int index); | 60 virtual void HighlightChangedTo(int index); |
| 61 virtual void ActivatedAt(int index); | 61 virtual void ActivatedAt(int index); |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 | 162 |
| 163 friend class BackFwdMenuModelTest; | 163 friend class BackFwdMenuModelTest; |
| 164 FRIEND_TEST_ALL_PREFIXES(BackFwdMenuModelTest, BasicCase); | 164 FRIEND_TEST_ALL_PREFIXES(BackFwdMenuModelTest, BasicCase); |
| 165 FRIEND_TEST_ALL_PREFIXES(BackFwdMenuModelTest, MaxItemsTest); | 165 FRIEND_TEST_ALL_PREFIXES(BackFwdMenuModelTest, MaxItemsTest); |
| 166 FRIEND_TEST_ALL_PREFIXES(BackFwdMenuModelTest, ChapterStops); | 166 FRIEND_TEST_ALL_PREFIXES(BackFwdMenuModelTest, ChapterStops); |
| 167 | 167 |
| 168 DISALLOW_COPY_AND_ASSIGN(BackForwardMenuModel); | 168 DISALLOW_COPY_AND_ASSIGN(BackForwardMenuModel); |
| 169 }; | 169 }; |
| 170 | 170 |
| 171 #endif // CHROME_BROWSER_UI_TOOLBAR_BACK_FORWARD_MENU_MODEL_H_ | 171 #endif // CHROME_BROWSER_UI_TOOLBAR_BACK_FORWARD_MENU_MODEL_H_ |
| OLD | NEW |