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

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

Issue 1203713002: Limit access to ChromeBookmarkClient to bookmarks code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cleanup_bookmark_client
Patch Set: Rebase Created 5 years, 6 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
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_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
11 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
12 #include "chrome/browser/bookmarks/bookmark_stats.h" 12 #include "chrome/browser/bookmarks/bookmark_stats.h"
13 #include "chrome/browser/ui/views/bookmarks/bookmark_context_menu.h" 13 #include "chrome/browser/ui/views/bookmarks/bookmark_context_menu.h"
14 #include "components/bookmarks/browser/base_bookmark_model_observer.h" 14 #include "components/bookmarks/browser/base_bookmark_model_observer.h"
15 #include "components/bookmarks/browser/bookmark_node_data.h" 15 #include "components/bookmarks/browser/bookmark_node_data.h"
16 #include "ui/views/controls/menu/menu_delegate.h" 16 #include "ui/views/controls/menu/menu_delegate.h"
17 17
18 class Browser; 18 class Browser;
19 class ChromeBookmarkClient;
20 class Profile; 19 class Profile;
21 20
22 namespace content { 21 namespace content {
23 class PageNavigator; 22 class PageNavigator;
24 } 23 }
25 24
26 namespace ui { 25 namespace ui {
27 class OSExchangeData; 26 class OSExchangeData;
28 } 27 }
29 28
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 void SetPageNavigator(content::PageNavigator* navigator); 66 void SetPageNavigator(content::PageNavigator* navigator);
68 67
69 // Returns the id given to the next menu. 68 // Returns the id given to the next menu.
70 int next_menu_id() const { return next_menu_id_; } 69 int next_menu_id() const { return next_menu_id_; }
71 70
72 // Makes the menu for |node| the active menu. |start_index| is the index of 71 // Makes the menu for |node| the active menu. |start_index| is the index of
73 // the first child of |node| to show in the menu. 72 // the first child of |node| to show in the menu.
74 void SetActiveMenu(const bookmarks::BookmarkNode* node, int start_index); 73 void SetActiveMenu(const bookmarks::BookmarkNode* node, int start_index);
75 74
76 bookmarks::BookmarkModel* GetBookmarkModel(); 75 bookmarks::BookmarkModel* GetBookmarkModel();
77 ChromeBookmarkClient* GetChromeBookmarkClient();
78 76
79 // Returns the menu. 77 // Returns the menu.
80 views::MenuItemView* menu() { return menu_; } 78 views::MenuItemView* menu() { return menu_; }
81 79
82 // Returns the context menu, or NULL if the context menu isn't showing. 80 // Returns the context menu, or NULL if the context menu isn't showing.
83 views::MenuItemView* context_menu() { 81 views::MenuItemView* context_menu() {
84 return context_menu_.get() ? context_menu_->menu() : NULL; 82 return context_menu_.get() ? context_menu_->menu() : NULL;
85 } 83 }
86 84
87 views::Widget* parent() { return parent_; } 85 views::Widget* parent() { return parent_; }
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 // Is the model being changed? 199 // Is the model being changed?
202 bool is_mutating_model_; 200 bool is_mutating_model_;
203 201
204 // The location where this bookmark menu will be displayed (for UMA). 202 // The location where this bookmark menu will be displayed (for UMA).
205 BookmarkLaunchLocation location_; 203 BookmarkLaunchLocation location_;
206 204
207 DISALLOW_COPY_AND_ASSIGN(BookmarkMenuDelegate); 205 DISALLOW_COPY_AND_ASSIGN(BookmarkMenuDelegate);
208 }; 206 };
209 207
210 #endif // CHROME_BROWSER_UI_VIEWS_BOOKMARKS_BOOKMARK_MENU_DELEGATE_H_ 208 #endif // CHROME_BROWSER_UI_VIEWS_BOOKMARKS_BOOKMARK_MENU_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698