| 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 20 matching lines...) Expand all Loading... |
| 31 namespace views { | 31 namespace views { |
| 32 class MenuItemView; | 32 class MenuItemView; |
| 33 class Widget; | 33 class Widget; |
| 34 } | 34 } |
| 35 | 35 |
| 36 // BookmarkMenuDelegate acts as the (informal) views::MenuDelegate for showing | 36 // BookmarkMenuDelegate acts as the (informal) views::MenuDelegate for showing |
| 37 // bookmarks in a MenuItemView. BookmarkMenuDelegate informally implements | 37 // bookmarks in a MenuItemView. BookmarkMenuDelegate informally implements |
| 38 // MenuDelegate as its assumed another class is going to forward the appropriate | 38 // MenuDelegate as its assumed another class is going to forward the appropriate |
| 39 // methods to this class. Doing so allows this class to be used for both menus | 39 // methods to this class. Doing so allows this class to be used for both menus |
| 40 // on the bookmark bar and the bookmarks in the wrench menu. | 40 // on the bookmark bar and the bookmarks in the wrench menu. |
| 41 class BookmarkMenuDelegate : public BaseBookmarkModelObserver, | 41 class BookmarkMenuDelegate : public bookmarks::BaseBookmarkModelObserver, |
| 42 public BookmarkContextMenuObserver { | 42 public BookmarkContextMenuObserver { |
| 43 public: | 43 public: |
| 44 enum ShowOptions { | 44 enum ShowOptions { |
| 45 // Indicates a menu should be added containing the permanent folders (other | 45 // Indicates a menu should be added containing the permanent folders (other |
| 46 // than then bookmark bar folder). This only makes sense when showing the | 46 // than then bookmark bar folder). This only makes sense when showing the |
| 47 // contents of the bookmark bar folder. | 47 // contents of the bookmark bar folder. |
| 48 SHOW_PERMANENT_FOLDERS, | 48 SHOW_PERMANENT_FOLDERS, |
| 49 | 49 |
| 50 // Don't show any additional folders. | 50 // Don't show any additional folders. |
| 51 HIDE_PERMANENT_FOLDERS | 51 HIDE_PERMANENT_FOLDERS |
| (...skipping 155 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 |