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

Side by Side Diff: chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm

Issue 2793363002: [Mac] Remove no-op method in bookmark bar controller (Closed)
Patch Set: Make test clearer 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 unified diff | Download patch
« no previous file with comments | « chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.h" 5 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #import "base/mac/bundle_locations.h" 9 #import "base/mac/bundle_locations.h"
10 #import "base/mac/foundation_util.h" 10 #import "base/mac/foundation_util.h"
(...skipping 2290 matching lines...) Expand 10 before | Expand all | Expand 10 after
2301 [self createSupervisedBookmarksButton]; 2301 [self createSupervisedBookmarksButton];
2302 [self addNodesToButtonList:node]; 2302 [self addNodesToButtonList:node];
2303 [self createOtherBookmarksButton]; 2303 [self createOtherBookmarksButton];
2304 [self updateTheme:[[[self view] window] themeProvider]]; 2304 [self updateTheme:[[[self view] window] themeProvider]];
2305 [self positionRightSideButtons]; 2305 [self positionRightSideButtons];
2306 [self addButtonsToView]; 2306 [self addButtonsToView];
2307 [self configureOffTheSideButtonContentsAndVisibility]; 2307 [self configureOffTheSideButtonContentsAndVisibility];
2308 [self reconfigureBookmarkBar]; 2308 [self reconfigureBookmarkBar];
2309 } 2309 }
2310 2310
2311 - (void)beingDeleted:(BookmarkModel*)model {
2312 // The browser may be being torn down; little is safe to do. As an
2313 // example, it may not be safe to clear the pasteboard.
2314 // http://crbug.com/38665
2315 }
2316
2317 - (void)nodeAdded:(BookmarkModel*)model 2311 - (void)nodeAdded:(BookmarkModel*)model
2318 parent:(const BookmarkNode*)newParent index:(int)newIndex { 2312 parent:(const BookmarkNode*)newParent index:(int)newIndex {
2319 // If a context menu is open, close it. 2313 // If a context menu is open, close it.
2320 [self cancelMenuTracking]; 2314 [self cancelMenuTracking];
2321 2315
2322 const BookmarkNode* newNode = newParent->GetChild(newIndex); 2316 const BookmarkNode* newNode = newParent->GetChild(newIndex);
2323 id<BookmarkButtonControllerProtocol> newController = 2317 id<BookmarkButtonControllerProtocol> newController =
2324 [self controllerForNode:newParent]; 2318 [self controllerForNode:newParent];
2325 [newController addButtonForNode:newNode atIndex:newIndex]; 2319 [newController addButtonForNode:newNode atIndex:newIndex];
2326 // If we go from 0 --> 1 bookmarks we may need to hide the 2320 // If we go from 0 --> 1 bookmarks we may need to hide the
(...skipping 626 matching lines...) Expand 10 before | Expand all | Expand 10 after
2953 - (id<BookmarkButtonControllerProtocol>)controllerForNode: 2947 - (id<BookmarkButtonControllerProtocol>)controllerForNode:
2954 (const BookmarkNode*)node { 2948 (const BookmarkNode*)node {
2955 // See if it's in the bar, then if it is in the hierarchy of visible 2949 // See if it's in the bar, then if it is in the hierarchy of visible
2956 // folder menus. 2950 // folder menus.
2957 if (bookmarkModel_->bookmark_bar_node() == node) 2951 if (bookmarkModel_->bookmark_bar_node() == node)
2958 return self; 2952 return self;
2959 return [folderController_ controllerForNode:node]; 2953 return [folderController_ controllerForNode:node];
2960 } 2954 }
2961 2955
2962 @end 2956 @end
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698