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_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 |
| 21 namespace bookmarks { |
| 22 class ManagedBookmarkService; |
| 23 } |
| 24 |
22 namespace content { | 25 namespace content { |
23 class PageNavigator; | 26 class PageNavigator; |
24 } | 27 } |
25 | 28 |
26 namespace ui { | 29 namespace ui { |
27 class OSExchangeData; | 30 class OSExchangeData; |
28 } | 31 } |
29 | 32 |
30 namespace views { | 33 namespace views { |
31 class MenuItemView; | 34 class MenuItemView; |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 void SetPageNavigator(content::PageNavigator* navigator); | 70 void SetPageNavigator(content::PageNavigator* navigator); |
68 | 71 |
69 // Returns the id given to the next menu. | 72 // Returns the id given to the next menu. |
70 int next_menu_id() const { return next_menu_id_; } | 73 int next_menu_id() const { return next_menu_id_; } |
71 | 74 |
72 // Makes the menu for |node| the active menu. |start_index| is the index of | 75 // 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. | 76 // the first child of |node| to show in the menu. |
74 void SetActiveMenu(const bookmarks::BookmarkNode* node, int start_index); | 77 void SetActiveMenu(const bookmarks::BookmarkNode* node, int start_index); |
75 | 78 |
76 bookmarks::BookmarkModel* GetBookmarkModel(); | 79 bookmarks::BookmarkModel* GetBookmarkModel(); |
77 ChromeBookmarkClient* GetChromeBookmarkClient(); | 80 bookmarks::ManagedBookmarkService* GetManagedBookmarkService(); |
78 | 81 |
79 // Returns the menu. | 82 // Returns the menu. |
80 views::MenuItemView* menu() { return menu_; } | 83 views::MenuItemView* menu() { return menu_; } |
81 | 84 |
82 // Returns the context menu, or NULL if the context menu isn't showing. | 85 // Returns the context menu, or NULL if the context menu isn't showing. |
83 views::MenuItemView* context_menu() { | 86 views::MenuItemView* context_menu() { |
84 return context_menu_.get() ? context_menu_->menu() : NULL; | 87 return context_menu_.get() ? context_menu_->menu() : NULL; |
85 } | 88 } |
86 | 89 |
87 views::Widget* parent() { return parent_; } | 90 views::Widget* parent() { return parent_; } |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
201 // Is the model being changed? | 204 // Is the model being changed? |
202 bool is_mutating_model_; | 205 bool is_mutating_model_; |
203 | 206 |
204 // The location where this bookmark menu will be displayed (for UMA). | 207 // The location where this bookmark menu will be displayed (for UMA). |
205 BookmarkLaunchLocation location_; | 208 BookmarkLaunchLocation location_; |
206 | 209 |
207 DISALLOW_COPY_AND_ASSIGN(BookmarkMenuDelegate); | 210 DISALLOW_COPY_AND_ASSIGN(BookmarkMenuDelegate); |
208 }; | 211 }; |
209 | 212 |
210 #endif // CHROME_BROWSER_UI_VIEWS_BOOKMARKS_BOOKMARK_MENU_DELEGATE_H_ | 213 #endif // CHROME_BROWSER_UI_VIEWS_BOOKMARKS_BOOKMARK_MENU_DELEGATE_H_ |
OLD | NEW |