Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(51)

Side by Side Diff: chrome/browser/ui/views/bookmarks/bookmark_menu_controller_views.h

Issue 331993009: MacViews: Run native Cocoa context menus to support Services. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add VIEWS_EXPORT for unit test access Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698