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

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

Issue 7749011: Plumbs through changing navigator to bookmark menus. This is needed in (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 4 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_CONTEXT_MENU_CONTROLLER_VIEWS _H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_BOOKMARKS_BOOKMARK_CONTEXT_MENU_CONTROLLER_VIEWS _H_
6 #define CHROME_BROWSER_UI_VIEWS_BOOKMARKS_BOOKMARK_CONTEXT_MENU_CONTROLLER_VIEWS _H_ 6 #define CHROME_BROWSER_UI_VIEWS_BOOKMARKS_BOOKMARK_CONTEXT_MENU_CONTROLLER_VIEWS _H_
7 #pragma once 7 #pragma once
8 8
9 #include <vector> 9 #include <vector>
10 10
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 const BookmarkNode* parent, 59 const BookmarkNode* parent,
60 const std::vector<const BookmarkNode*>& selection); 60 const std::vector<const BookmarkNode*>& selection);
61 virtual ~BookmarkContextMenuControllerViews(); 61 virtual ~BookmarkContextMenuControllerViews();
62 62
63 void BuildMenu(); 63 void BuildMenu();
64 64
65 void ExecuteCommand(int id); 65 void ExecuteCommand(int id);
66 bool IsItemChecked(int id) const; 66 bool IsItemChecked(int id) const;
67 bool IsCommandEnabled(int id) const; 67 bool IsCommandEnabled(int id) const;
68 68
69 // Accessors:
70 Profile* profile() const { return profile_; } 69 Profile* profile() const { return profile_; }
70
71 void set_navigator(PageNavigator* navigator) { navigator_ = navigator; }
71 PageNavigator* navigator() const { return navigator_; } 72 PageNavigator* navigator() const { return navigator_; }
72 73
73 private: 74 private:
74 // Overridden from BaseBookmarkModelObserver: 75 // Overridden from BaseBookmarkModelObserver:
75 // Any change to the model results in closing the menu. 76 // Any change to the model results in closing the menu.
76 virtual void BookmarkModelChanged(); 77 virtual void BookmarkModelChanged();
77 78
78 // Removes the observer from the model and NULLs out model_. 79 // Removes the observer from the model and NULLs out model_.
79 BookmarkModel* RemoveModelObserver(); 80 BookmarkModel* RemoveModelObserver();
80 81
81 // Returns true if selection_ has at least one bookmark of type url. 82 // Returns true if selection_ has at least one bookmark of type url.
82 bool HasURLs() const; 83 bool HasURLs() const;
83 84
84 views::Widget* parent_widget_; 85 views::Widget* parent_widget_;
85 BookmarkContextMenuControllerViewsDelegate* delegate_; 86 BookmarkContextMenuControllerViewsDelegate* delegate_;
86 Profile* profile_; 87 Profile* profile_;
87 PageNavigator* navigator_; 88 PageNavigator* navigator_;
88 const BookmarkNode* parent_; 89 const BookmarkNode* parent_;
89 std::vector<const BookmarkNode*> selection_; 90 std::vector<const BookmarkNode*> selection_;
90 BookmarkModel* model_; 91 BookmarkModel* model_;
91 92
92 DISALLOW_COPY_AND_ASSIGN(BookmarkContextMenuControllerViews); 93 DISALLOW_COPY_AND_ASSIGN(BookmarkContextMenuControllerViews);
93 }; 94 };
94 95
95 #endif // CHROME_BROWSER_UI_VIEWS_BOOKMARKS_BOOKMARK_CONTEXT_MENU_CONTROLLER_VI EWS_H_ 96 #endif // CHROME_BROWSER_UI_VIEWS_BOOKMARKS_BOOKMARK_CONTEXT_MENU_CONTROLLER_VI EWS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698