| 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_BOOKMARK_BAR_CONTEXT_MENU_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_BOOKMARK_BAR_CONTEXT_MENU_CONTROLLER_H_ |
| 6 #define CHROME_BROWSER_BOOKMARK_BAR_CONTEXT_MENU_CONTROLLER_H_ | 6 #define CHROME_BROWSER_BOOKMARK_BAR_CONTEXT_MENU_CONTROLLER_H_ |
| 7 | 7 |
| 8 #include "chrome/views/chrome_menu.h" | 8 #include "chrome/views/chrome_menu.h" |
| 9 #include "chrome/browser/views/bookmark_bar_view.h" | 9 #include "chrome/browser/views/bookmark_bar_view.h" |
| 10 #include "webkit/glue/window_open_disposition.h" |
| 10 | 11 |
| 11 class BookmarkNode; | 12 class BookmarkNode; |
| 12 class PageNavigator; | 13 class PageNavigator; |
| 13 | 14 |
| 14 // BookmarkBarContextMenuController manages the context menus shown for the | 15 // BookmarkBarContextMenuController manages the context menus shown for the |
| 15 // bookmark bar, items on the bookmark bar, and submens of folders on the | 16 // bookmark bar, items on the bookmark bar, and submens of folders on the |
| 16 // bookmark bar. | 17 // bookmark bar. |
| 17 class BookmarkBarContextMenuController : public ChromeViews::MenuDelegate, | 18 class BookmarkBarContextMenuController : public ChromeViews::MenuDelegate, |
| 18 public BookmarkBarView::ModelChangedListener { | 19 public BookmarkBarView::ModelChangedListener { |
| 19 public: | 20 public: |
| 21 // Recursively opens all bookmarks of |node|. |initial_disposition| dictates |
| 22 // how the first URL is opened, all subsequent URLs are opened as background |
| 23 // tabs. |
| 24 static void OpenAll(HWND parent, |
| 25 PageNavigator* navigator, |
| 26 BookmarkNode* node, |
| 27 WindowOpenDisposition initial_disposition); |
| 28 |
| 20 BookmarkBarContextMenuController(BookmarkBarView* view, | 29 BookmarkBarContextMenuController(BookmarkBarView* view, |
| 21 BookmarkNode* node); | 30 BookmarkNode* node); |
| 22 | 31 |
| 23 // Shows the menu at the specified place. | 32 // Shows the menu at the specified place. |
| 24 void RunMenuAt(int x, int y); | 33 void RunMenuAt(int x, int y); |
| 25 | 34 |
| 26 // ModelChangedListener method, cancels the menu. | 35 // ModelChangedListener method, cancels the menu. |
| 27 virtual void ModelChanged(); | 36 virtual void ModelChanged(); |
| 28 | 37 |
| 29 // Returns the menu. | 38 // Returns the menu. |
| (...skipping 23 matching lines...) Expand all Loading... |
| 53 | 62 |
| 54 ChromeViews::MenuItemView menu_; | 63 ChromeViews::MenuItemView menu_; |
| 55 BookmarkBarView* view_; | 64 BookmarkBarView* view_; |
| 56 BookmarkNode* node_; | 65 BookmarkNode* node_; |
| 57 | 66 |
| 58 DISALLOW_EVIL_CONSTRUCTORS(BookmarkBarContextMenuController); | 67 DISALLOW_EVIL_CONSTRUCTORS(BookmarkBarContextMenuController); |
| 59 }; | 68 }; |
| 60 | 69 |
| 61 #endif // CHROME_BROWSER_BOOKMARK_BAR_CONTEXT_MENU_CONTROLLER_H_ | 70 #endif // CHROME_BROWSER_BOOKMARK_BAR_CONTEXT_MENU_CONTROLLER_H_ |
| 62 | 71 |
| OLD | NEW |