| 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_CONTROLLER_VIEWS_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_BOOKMARKS_BOOKMARK_MENU_CONTROLLER_VIEWS_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_BOOKMARKS_BOOKMARK_MENU_CONTROLLER_VIEWS_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_BOOKMARKS_BOOKMARK_MENU_CONTROLLER_VIEWS_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 | 9 |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 // be explicitly hidden by way of the Cancel method. | 39 // be explicitly hidden by way of the Cancel method. |
| 40 class BookmarkMenuController : public BaseBookmarkModelObserver, | 40 class BookmarkMenuController : public BaseBookmarkModelObserver, |
| 41 public views::MenuDelegate { | 41 public views::MenuDelegate { |
| 42 public: | 42 public: |
| 43 // Creates a BookmarkMenuController showing the children of |node| starting | 43 // Creates a BookmarkMenuController showing the children of |node| starting |
| 44 // at |start_child_index|. | 44 // at |start_child_index|. |
| 45 BookmarkMenuController(Browser* browser, | 45 BookmarkMenuController(Browser* browser, |
| 46 content::PageNavigator* page_navigator, | 46 content::PageNavigator* page_navigator, |
| 47 views::Widget* parent, | 47 views::Widget* parent, |
| 48 const BookmarkNode* node, | 48 const BookmarkNode* node, |
| 49 int start_child_index); | 49 int start_child_index, |
| 50 bool for_drop); |
| 50 | 51 |
| 51 void RunMenuAt(BookmarkBarView* bookmark_bar, bool for_drop); | 52 void RunMenuAt(BookmarkBarView* bookmark_bar); |
| 52 | 53 |
| 53 void clear_bookmark_bar() { | 54 void clear_bookmark_bar() { |
| 54 bookmark_bar_ = NULL; | 55 bookmark_bar_ = NULL; |
| 55 } | 56 } |
| 56 | 57 |
| 57 // Hides the menu. | 58 // Hides the menu. |
| 58 void Cancel(); | 59 void Cancel(); |
| 59 | 60 |
| 60 // Returns the node the menu is showing for. | 61 // Returns the node the menu is showing for. |
| 61 const BookmarkNode* node() const { return node_; } | 62 const BookmarkNode* node() const { return node_; } |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 | 138 |
| 138 // The bookmark bar. This is only non-null if we're showing a menu item for a | 139 // The bookmark bar. This is only non-null if we're showing a menu item for a |
| 139 // folder on the bookmark bar and not for drop, or if the BookmarkBarView has | 140 // folder on the bookmark bar and not for drop, or if the BookmarkBarView has |
| 140 // been destroyed before the menu. | 141 // been destroyed before the menu. |
| 141 BookmarkBarView* bookmark_bar_; | 142 BookmarkBarView* bookmark_bar_; |
| 142 | 143 |
| 143 DISALLOW_COPY_AND_ASSIGN(BookmarkMenuController); | 144 DISALLOW_COPY_AND_ASSIGN(BookmarkMenuController); |
| 144 }; | 145 }; |
| 145 | 146 |
| 146 #endif // CHROME_BROWSER_UI_VIEWS_BOOKMARKS_BOOKMARK_MENU_CONTROLLER_VIEWS_H_ | 147 #endif // CHROME_BROWSER_UI_VIEWS_BOOKMARKS_BOOKMARK_MENU_CONTROLLER_VIEWS_H_ |
| OLD | NEW |