OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_VIEWS_BOOKMARKS_BOOKMARK_MENU_DELEGATE_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_BOOKMARKS_BOOKMARK_MENU_DELEGATE_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_BOOKMARKS_BOOKMARK_MENU_DELEGATE_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_BOOKMARKS_BOOKMARK_MENU_DELEGATE_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 | 10 |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 // If |node| has children a new menu is created and added to |menu| to | 148 // If |node| has children a new menu is created and added to |menu| to |
149 // represent it. If |node| is not empty and |added_separator| is false, a | 149 // represent it. If |node| is not empty and |added_separator| is false, a |
150 // separator is added before the new menu items and |added_separator| is set | 150 // separator is added before the new menu items and |added_separator| is set |
151 // to true. | 151 // to true. |
152 void BuildMenuForPermanentNode(const BookmarkNode* node, | 152 void BuildMenuForPermanentNode(const BookmarkNode* node, |
153 int icon_resource_id, | 153 int icon_resource_id, |
154 views::MenuItemView* menu, | 154 views::MenuItemView* menu, |
155 int* next_menu_id, | 155 int* next_menu_id, |
156 bool* added_separator); | 156 bool* added_separator); |
157 | 157 |
158 void BuildMenuForManagedNode(views::MenuItemView* menu, | 158 void BuildMenuForManagedNode(views::MenuItemView* menu, int* next_menu_id); |
159 int* next_menu_id); | 159 void BuildMenuForSupervisedNode(views::MenuItemView* menu, int* next_menu_id); |
160 | 160 |
161 // Creates an entry in menu for each child node of |parent| starting at | 161 // Creates an entry in menu for each child node of |parent| starting at |
162 // |start_child_index|. | 162 // |start_child_index|. |
163 void BuildMenu(const BookmarkNode* parent, | 163 void BuildMenu(const BookmarkNode* parent, |
164 int start_child_index, | 164 int start_child_index, |
165 views::MenuItemView* menu, | 165 views::MenuItemView* menu, |
166 int* next_menu_id); | 166 int* next_menu_id); |
167 | 167 |
168 // Returns true if |menu_id_| is outside the range of minimum and maximum menu | 168 // Returns true if |menu_id_| is outside the range of minimum and maximum menu |
169 // ID's allowed. | 169 // ID's allowed. |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
207 // Is the model being changed? | 207 // Is the model being changed? |
208 bool is_mutating_model_; | 208 bool is_mutating_model_; |
209 | 209 |
210 // The location where this bookmark menu will be displayed (for UMA). | 210 // The location where this bookmark menu will be displayed (for UMA). |
211 BookmarkLaunchLocation location_; | 211 BookmarkLaunchLocation location_; |
212 | 212 |
213 DISALLOW_COPY_AND_ASSIGN(BookmarkMenuDelegate); | 213 DISALLOW_COPY_AND_ASSIGN(BookmarkMenuDelegate); |
214 }; | 214 }; |
215 | 215 |
216 #endif // CHROME_BROWSER_UI_VIEWS_BOOKMARKS_BOOKMARK_MENU_DELEGATE_H_ | 216 #endif // CHROME_BROWSER_UI_VIEWS_BOOKMARKS_BOOKMARK_MENU_DELEGATE_H_ |
OLD | NEW |