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

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

Issue 1630453002: [Mac] Fix BMB chevron button being black on Chrome open. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 | « no previous file | 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 #include "base/mac/bundle_locations.h" 9 #include "base/mac/bundle_locations.h"
10 #include "base/mac/sdk_forward_declarations.h" 10 #include "base/mac/sdk_forward_declarations.h"
(...skipping 847 matching lines...) Expand 10 before | Expand all | Expand 10 after
858 858
859 // Configure the off-the-side button (e.g. specify the node range, 859 // Configure the off-the-side button (e.g. specify the node range,
860 // check if we should enable or disable it, etc). 860 // check if we should enable or disable it, etc).
861 - (void)configureOffTheSideButtonContentsAndVisibility { 861 - (void)configureOffTheSideButtonContentsAndVisibility {
862 [[offTheSideButton_ cell] setStartingChildIndex:displayedButtonCount_]; 862 [[offTheSideButton_ cell] setStartingChildIndex:displayedButtonCount_];
863 [[offTheSideButton_ cell] 863 [[offTheSideButton_ cell]
864 setBookmarkNode:bookmarkModel_->bookmark_bar_node()]; 864 setBookmarkNode:bookmarkModel_->bookmark_bar_node()];
865 int bookmarkChildren = bookmarkModel_->bookmark_bar_node()->child_count(); 865 int bookmarkChildren = bookmarkModel_->bookmark_bar_node()->child_count();
866 if (bookmarkChildren > displayedButtonCount_) { 866 if (bookmarkChildren > displayedButtonCount_) {
867 [offTheSideButton_ setHidden:NO]; 867 [offTheSideButton_ setHidden:NO];
868 [offTheSideButton_ setNeedsDisplay:YES];
erikchen 2016/01/25 14:51:05 Does your CL still fix the problem if we only call
Alexei Svitkine (slow) 2016/01/25 17:34:59 Unfortunately, that doesn't work (on its own). The
868 } else { 869 } else {
869 // If we just deleted the last item in an off-the-side menu so the 870 // If we just deleted the last item in an off-the-side menu so the
870 // button will be going away, make sure the menu goes away. 871 // button will be going away, make sure the menu goes away.
871 if (folderController_ && 872 if (folderController_ &&
872 ([folderController_ parentButton] == offTheSideButton_)) 873 ([folderController_ parentButton] == offTheSideButton_))
873 [self closeAllBookmarkFolders]; 874 [self closeAllBookmarkFolders];
874 // (And hide the button, too.) 875 // (And hide the button, too.)
875 [offTheSideButton_ setHidden:YES]; 876 [offTheSideButton_ setHidden:YES];
876 } 877 }
877 } 878 }
(...skipping 2062 matching lines...) Expand 10 before | Expand all | Expand 10 after
2940 - (id<BookmarkButtonControllerProtocol>)controllerForNode: 2941 - (id<BookmarkButtonControllerProtocol>)controllerForNode:
2941 (const BookmarkNode*)node { 2942 (const BookmarkNode*)node {
2942 // See if it's in the bar, then if it is in the hierarchy of visible 2943 // See if it's in the bar, then if it is in the hierarchy of visible
2943 // folder menus. 2944 // folder menus.
2944 if (bookmarkModel_->bookmark_bar_node() == node) 2945 if (bookmarkModel_->bookmark_bar_node() == node)
2945 return self; 2946 return self;
2946 return [folderController_ controllerForNode:node]; 2947 return [folderController_ controllerForNode:node];
2947 } 2948 }
2948 2949
2949 @end 2950 @end
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698