| 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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 // Invokes BuildMenuForPermanentNode() for the permanent nodes (excluding | 143 // Invokes BuildMenuForPermanentNode() for the permanent nodes (excluding |
| 144 // 'other bookmarks' folder). | 144 // 'other bookmarks' folder). |
| 145 void BuildMenusForPermanentNodes(views::MenuItemView* menu, | 145 void BuildMenusForPermanentNodes(views::MenuItemView* menu, |
| 146 int* next_menu_id); | 146 int* next_menu_id); |
| 147 | 147 |
| 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 views::MenuItemView* menu, | 154 views::MenuItemView* menu, |
| 154 int* next_menu_id, | 155 int* next_menu_id, |
| 155 bool* added_separator); | 156 bool* added_separator); |
| 156 | 157 |
| 157 void BuildMenuForManagedNode(views::MenuItemView* menu, | 158 void BuildMenuForManagedNode(views::MenuItemView* menu, |
| 158 int* next_menu_id); | 159 int* next_menu_id); |
| 159 | 160 |
| 160 // 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 |
| 161 // |start_child_index|. | 162 // |start_child_index|. |
| 162 void BuildMenu(const BookmarkNode* parent, | 163 void BuildMenu(const BookmarkNode* parent, |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 206 // Is the model being changed? | 207 // Is the model being changed? |
| 207 bool is_mutating_model_; | 208 bool is_mutating_model_; |
| 208 | 209 |
| 209 // The location where this bookmark menu will be displayed (for UMA). | 210 // The location where this bookmark menu will be displayed (for UMA). |
| 210 BookmarkLaunchLocation location_; | 211 BookmarkLaunchLocation location_; |
| 211 | 212 |
| 212 DISALLOW_COPY_AND_ASSIGN(BookmarkMenuDelegate); | 213 DISALLOW_COPY_AND_ASSIGN(BookmarkMenuDelegate); |
| 213 }; | 214 }; |
| 214 | 215 |
| 215 #endif // CHROME_BROWSER_UI_VIEWS_BOOKMARKS_BOOKMARK_MENU_DELEGATE_H_ | 216 #endif // CHROME_BROWSER_UI_VIEWS_BOOKMARKS_BOOKMARK_MENU_DELEGATE_H_ |
| OLD | NEW |