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

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

Issue 1647003002: Make bookmark context menu asynchronous (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@b564255_move_key_handler_out_of_message_loop
Patch Set: Removed loggings Created 4 years, 10 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
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 void WriteDragData(views::MenuItemView* sender, ui::OSExchangeData* data); 129 void WriteDragData(views::MenuItemView* sender, ui::OSExchangeData* data);
130 int GetDragOperations(views::MenuItemView* sender); 130 int GetDragOperations(views::MenuItemView* sender);
131 int GetMaxWidthForMenu(views::MenuItemView* menu); 131 int GetMaxWidthForMenu(views::MenuItemView* menu);
132 void WillShowMenu(views::MenuItemView* menu); 132 void WillShowMenu(views::MenuItemView* menu);
133 133
134 // BookmarkModelObserver methods. 134 // BookmarkModelObserver methods.
135 void BookmarkModelChanged() override; 135 void BookmarkModelChanged() override;
136 void BookmarkNodeFaviconChanged(bookmarks::BookmarkModel* model, 136 void BookmarkNodeFaviconChanged(bookmarks::BookmarkModel* model,
137 const bookmarks::BookmarkNode* node) override; 137 const bookmarks::BookmarkNode* node) override;
138 138
139 // BookmarkContextMenu::Observer methods. 139 // BookmarkContextMenuObserver methods.
140 void WillRemoveBookmarks( 140 void WillRemoveBookmarks(
141 const std::vector<const bookmarks::BookmarkNode*>& bookmarks) override; 141 const std::vector<const bookmarks::BookmarkNode*>& bookmarks) override;
142 void DidRemoveBookmarks() override; 142 void DidRemoveBookmarks() override;
143 void OnContextMenuClosed() override;
143 144
144 private: 145 private:
145 friend class BookmarkMenuDelegateTest; 146 friend class BookmarkMenuDelegateTest;
146 147
147 typedef std::map<int, const bookmarks::BookmarkNode*> MenuIDToNodeMap; 148 typedef std::map<int, const bookmarks::BookmarkNode*> MenuIDToNodeMap;
148 typedef std::map<const bookmarks::BookmarkNode*, views::MenuItemView*> 149 typedef std::map<const bookmarks::BookmarkNode*, views::MenuItemView*>
149 NodeToMenuMap; 150 NodeToMenuMap;
150 151
151 // Returns whether the menu should close id 'delete' is selected. 152 // Returns whether the menu should close id 'delete' is selected.
152 bool ShouldCloseOnRemove(const bookmarks::BookmarkNode* node) const; 153 bool ShouldCloseOnRemove(const bookmarks::BookmarkNode* node) const;
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 // Is the model being changed? 217 // Is the model being changed?
217 bool is_mutating_model_; 218 bool is_mutating_model_;
218 219
219 // The location where this bookmark menu will be displayed (for UMA). 220 // The location where this bookmark menu will be displayed (for UMA).
220 BookmarkLaunchLocation location_; 221 BookmarkLaunchLocation location_;
221 222
222 DISALLOW_COPY_AND_ASSIGN(BookmarkMenuDelegate); 223 DISALLOW_COPY_AND_ASSIGN(BookmarkMenuDelegate);
223 }; 224 };
224 225
225 #endif // CHROME_BROWSER_UI_VIEWS_BOOKMARKS_BOOKMARK_MENU_DELEGATE_H_ 226 #endif // CHROME_BROWSER_UI_VIEWS_BOOKMARKS_BOOKMARK_MENU_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698