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 |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 views::MenuItemView* menu() const { return menu_; } | 78 views::MenuItemView* menu() const { return menu_; } |
79 | 79 |
80 // 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. |
81 views::MenuItemView* context_menu() const { | 81 views::MenuItemView* context_menu() const { |
82 return context_menu_.get() ? context_menu_->menu() : NULL; | 82 return context_menu_.get() ? context_menu_->menu() : NULL; |
83 } | 83 } |
84 | 84 |
85 Profile* profile() { return profile_; } | 85 Profile* profile() { return profile_; } |
86 | 86 |
87 views::Widget* parent() { return parent_; } | 87 views::Widget* parent() { return parent_; } |
| 88 const views::Widget* parent() const { return parent_; } |
| 89 |
88 | 90 |
89 // Returns true if we're in the process of mutating the model. This happens | 91 // Returns true if we're in the process of mutating the model. This happens |
90 // when the user deletes menu items using the context menu. | 92 // when the user deletes menu items using the context menu. |
91 bool is_mutating_model() const { return is_mutating_model_; } | 93 bool is_mutating_model() const { return is_mutating_model_; } |
92 | 94 |
93 // MenuDelegate like methods (see class description for details). | 95 // MenuDelegate like methods (see class description for details). |
94 string16 GetTooltipText(int id, const gfx::Point& p) const; | 96 string16 GetTooltipText(int id, const gfx::Point& p) const; |
95 bool IsTriggerableEvent(views::MenuItemView* menu, | 97 bool IsTriggerableEvent(views::MenuItemView* menu, |
96 const ui::Event& e); | 98 const ui::Event& e); |
97 void ExecuteCommand(int id, int mouse_event_flags); | 99 void ExecuteCommand(int id, int mouse_event_flags); |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
202 // Is the model being changed? | 204 // Is the model being changed? |
203 bool is_mutating_model_; | 205 bool is_mutating_model_; |
204 | 206 |
205 // The location where this bookmark menu will be displayed (for UMA). | 207 // The location where this bookmark menu will be displayed (for UMA). |
206 bookmark_utils::BookmarkLaunchLocation location_; | 208 bookmark_utils::BookmarkLaunchLocation location_; |
207 | 209 |
208 DISALLOW_COPY_AND_ASSIGN(BookmarkMenuDelegate); | 210 DISALLOW_COPY_AND_ASSIGN(BookmarkMenuDelegate); |
209 }; | 211 }; |
210 | 212 |
211 #endif // CHROME_BROWSER_UI_VIEWS_BOOKMARKS_BOOKMARK_MENU_DELEGATE_H_ | 213 #endif // CHROME_BROWSER_UI_VIEWS_BOOKMARKS_BOOKMARK_MENU_DELEGATE_H_ |
OLD | NEW |