OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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_BACK_FORWARD_MENU_MODEL_H_ | 5 #ifndef CHROME_BROWSER_BACK_FORWARD_MENU_MODEL_H_ |
6 #define CHROME_BROWSER_BACK_FORWARD_MENU_MODEL_H_ | 6 #define CHROME_BROWSER_BACK_FORWARD_MENU_MODEL_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| 11 #include "base/string16.h" |
11 | 12 |
12 class Browser; | 13 class Browser; |
13 class SkBitmap; | 14 class SkBitmap; |
14 class TabContents; | 15 class TabContents; |
15 class NavigationEntry; | 16 class NavigationEntry; |
16 | 17 |
17 /////////////////////////////////////////////////////////////////////////////// | 18 /////////////////////////////////////////////////////////////////////////////// |
18 // | 19 // |
19 // BackForwardMenuModel | 20 // BackForwardMenuModel |
20 // | 21 // |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 int FindChapterStop(int offset, bool forward, int skip) const; | 86 int FindChapterStop(int offset, bool forward, int skip) const; |
86 | 87 |
87 // Execute the command associated with |menu_id|. | 88 // Execute the command associated with |menu_id|. |
88 void ExecuteCommandById(int menu_id); | 89 void ExecuteCommandById(int menu_id); |
89 | 90 |
90 // Is the item at |menu_id| a separator? | 91 // Is the item at |menu_id| a separator? |
91 bool IsSeparator(int menu_id) const; | 92 bool IsSeparator(int menu_id) const; |
92 | 93 |
93 // Get the display text for the item. This should not be called on a | 94 // Get the display text for the item. This should not be called on a |
94 // separator. | 95 // separator. |
95 std::wstring GetItemLabel(int menu_id) const; | 96 string16 GetItemLabel(int menu_id) const; |
96 | 97 |
97 // Get the display icon for the item. This should not be called on a | 98 // Get the display icon for the item. This should not be called on a |
98 // separator or an item that does not have an icon. | 99 // separator or an item that does not have an icon. |
99 const SkBitmap& GetItemIcon(int menu_id) const; | 100 const SkBitmap& GetItemIcon(int menu_id) const; |
100 | 101 |
101 // Returns true if there is an icon for this menu item. | 102 // Returns true if there is an icon for this menu item. |
102 bool ItemHasIcon(int menu_id) const; | 103 bool ItemHasIcon(int menu_id) const; |
103 | 104 |
104 // Does the item does something when you click on it? | 105 // Does the item does something when you click on it? |
105 bool ItemHasCommand(int menu_id) const; | 106 bool ItemHasCommand(int menu_id) const; |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 | 149 |
149 // Represents whether this is the delegate for the forward button or the | 150 // Represents whether this is the delegate for the forward button or the |
150 // back button. | 151 // back button. |
151 ModelType model_type_; | 152 ModelType model_type_; |
152 | 153 |
153 private: | 154 private: |
154 DISALLOW_COPY_AND_ASSIGN(BackForwardMenuModel); | 155 DISALLOW_COPY_AND_ASSIGN(BackForwardMenuModel); |
155 }; | 156 }; |
156 | 157 |
157 #endif // CHROME_BROWSER_BACK_FORWARD_MENU_MODEL_H_ | 158 #endif // CHROME_BROWSER_BACK_FORWARD_MENU_MODEL_H_ |
OLD | NEW |