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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 bool ShowContextMenu(views::MenuItemView* source, | 115 bool ShowContextMenu(views::MenuItemView* source, |
116 int id, | 116 int id, |
117 const gfx::Point& p, | 117 const gfx::Point& p, |
118 ui::MenuSourceType source_type); | 118 ui::MenuSourceType source_type); |
119 bool CanDrag(views::MenuItemView* menu); | 119 bool CanDrag(views::MenuItemView* menu); |
120 void WriteDragData(views::MenuItemView* sender, ui::OSExchangeData* data); | 120 void WriteDragData(views::MenuItemView* sender, ui::OSExchangeData* data); |
121 int GetDragOperations(views::MenuItemView* sender); | 121 int GetDragOperations(views::MenuItemView* sender); |
122 int GetMaxWidthForMenu(views::MenuItemView* menu); | 122 int GetMaxWidthForMenu(views::MenuItemView* menu); |
123 | 123 |
124 // BookmarkModelObserver methods. | 124 // BookmarkModelObserver methods. |
125 virtual void BookmarkModelChanged() OVERRIDE; | 125 virtual void BookmarkModelChanged() override; |
126 virtual void BookmarkNodeFaviconChanged(BookmarkModel* model, | 126 virtual void BookmarkNodeFaviconChanged(BookmarkModel* model, |
127 const BookmarkNode* node) OVERRIDE; | 127 const BookmarkNode* node) override; |
128 | 128 |
129 // BookmarkContextMenu::Observer methods. | 129 // BookmarkContextMenu::Observer methods. |
130 virtual void WillRemoveBookmarks( | 130 virtual void WillRemoveBookmarks( |
131 const std::vector<const BookmarkNode*>& bookmarks) OVERRIDE; | 131 const std::vector<const BookmarkNode*>& bookmarks) override; |
132 virtual void DidRemoveBookmarks() OVERRIDE; | 132 virtual void DidRemoveBookmarks() override; |
133 | 133 |
134 private: | 134 private: |
135 typedef std::map<int, const BookmarkNode*> MenuIDToNodeMap; | 135 typedef std::map<int, const BookmarkNode*> MenuIDToNodeMap; |
136 typedef std::map<const BookmarkNode*, views::MenuItemView*> NodeToMenuMap; | 136 typedef std::map<const BookmarkNode*, views::MenuItemView*> NodeToMenuMap; |
137 | 137 |
138 // Creates a menu. This uses BuildMenu() to recursively populate the menu. | 138 // Creates a menu. This uses BuildMenu() to recursively populate the menu. |
139 views::MenuItemView* CreateMenu(const BookmarkNode* parent, | 139 views::MenuItemView* CreateMenu(const BookmarkNode* parent, |
140 int start_child_index, | 140 int start_child_index, |
141 ShowOptions show_options); | 141 ShowOptions show_options); |
142 | 142 |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
207 // Is the model being changed? | 207 // Is the model being changed? |
208 bool is_mutating_model_; | 208 bool is_mutating_model_; |
209 | 209 |
210 // The location where this bookmark menu will be displayed (for UMA). | 210 // The location where this bookmark menu will be displayed (for UMA). |
211 BookmarkLaunchLocation location_; | 211 BookmarkLaunchLocation location_; |
212 | 212 |
213 DISALLOW_COPY_AND_ASSIGN(BookmarkMenuDelegate); | 213 DISALLOW_COPY_AND_ASSIGN(BookmarkMenuDelegate); |
214 }; | 214 }; |
215 | 215 |
216 #endif // CHROME_BROWSER_UI_VIEWS_BOOKMARKS_BOOKMARK_MENU_DELEGATE_H_ | 216 #endif // CHROME_BROWSER_UI_VIEWS_BOOKMARKS_BOOKMARK_MENU_DELEGATE_H_ |
OLD | NEW |