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

Unified Diff: chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm

Issue 2798113002: [Mac] Remove more dead code from bookmark bar controller (Closed)
Patch Set: Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm
diff --git a/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm b/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm
index 90b8de69e69efc3e0a231ffb1ec9acce327a36b1..f0fb4ca20654aeb48501eaf2461812b3fb69804f 100644
--- a/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm
+++ b/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm
@@ -230,7 +230,6 @@ void RecordAppLaunch(Profile* profile, GURL url) {
// then show the no items label.
- (void)reconfigureBookmarkBar;
-- (void)clearMenuTagMap;
- (int)preferredHeight;
- (void)addButtonsToView;
- (BOOL)setManagedBookmarksButtonVisibility;
@@ -1086,11 +1085,6 @@ void RecordAppLaunch(Profile* profile, GURL url) {
browser_->OpenURL(params);
}
-- (void)clearMenuTagMap {
- seedId_ = 0;
- menuTagMap_.clear();
-}
-
- (int)preferredHeight {
DCHECK(![self isAnimationRunning]);
@@ -1112,15 +1106,6 @@ void RecordAppLaunch(Profile* profile, GURL url) {
return std::min([cell cellSize].width, bookmarks::kDefaultBookmarkWidth);
}
-- (IBAction)openBookmarkMenuItem:(id)sender {
- int64_t tag = [self nodeIdFromMenuTag:[sender tag]];
- const BookmarkNode* node =
- bookmarks::GetBookmarkNodeByID(bookmarkModel_, tag);
- WindowOpenDisposition disposition =
- ui::WindowOpenDispositionFromNSEvent([NSApp currentEvent]);
- [self openURL:node->url() disposition:disposition];
-}
-
// For the given root node of the bookmark bar, show or hide (as
// appropriate) the "no items" container (text which says "bookmarks
// go here").
@@ -1810,7 +1795,6 @@ void RecordAppLaunch(Profile* profile, GURL url) {
[button removeFromSuperview];
}
[buttons_ removeAllObjects];
- [self clearMenuTagMap];
displayedButtonCount_ = 0;
// Make sure there are no stale pointers in the pasteboard. This
@@ -1913,18 +1897,6 @@ void RecordAppLaunch(Profile* profile, GURL url) {
[self reconfigureBookmarkBar];
}
-// Given a NSMenuItem tag, return the appropriate bookmark node id.
-- (int64_t)nodeIdFromMenuTag:(int32_t)tag {
- return menuTagMap_[tag];
-}
-
-// Create and return a new tag for the given node id.
-- (int32_t)menuTagFromNodeId:(int64_t)menuid {
- int tag = seedId_++;
- menuTagMap_[tag] = menuid;
- return tag;
-}
-
// Adapt appearance of buttons to the current theme. Called after
// theme changes, or when our view is added to the view hierarchy.
// Oddly, the view pings us instead of us pinging our view. This is

Powered by Google App Engine
This is Rietveld 408576698