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

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

Issue 2862903002: [Mac] Reverse bookmark bar overflow chevron in RTL (Closed)
Patch Set: Created 3 years, 7 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 #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 846 matching lines...) Expand 10 before | Expand all | Expand 10 after
857 } 857 }
858 858
859 - (NSButton*)offTheSideButton { 859 - (NSButton*)offTheSideButton {
860 return offTheSideButton_; 860 return offTheSideButton_;
861 } 861 }
862 862
863 - (NSImage*)offTheSideButtonImage:(BOOL)forDarkMode { 863 - (NSImage*)offTheSideButtonImage:(BOOL)forDarkMode {
864 const int kIconSize = 8; 864 const int kIconSize = 8;
865 SkColor vectorIconColor = forDarkMode ? SkColorSetA(SK_ColorWHITE, 0xCC) 865 SkColor vectorIconColor = forDarkMode ? SkColorSetA(SK_ColorWHITE, 0xCC)
866 : gfx::kChromeIconGrey; 866 : gfx::kChromeIconGrey;
867 return NSImageFromImageSkia( 867 NSImage* image = NSImageFromImageSkia(
868 gfx::CreateVectorIcon(kOverflowChevronIcon, kIconSize, vectorIconColor)); 868 gfx::CreateVectorIcon(kOverflowChevronIcon, kIconSize, vectorIconColor));
869 if (cocoa_l10n_util::ShouldDoExperimentalRTLLayout())
870 return cocoa_l10n_util::FlippedImage(image);
871 else
872 return image;
869 } 873 }
870 874
871 #pragma mark Private Methods 875 #pragma mark Private Methods
872 876
873 // Called after a theme change took place, possibly for a different profile. 877 // Called after a theme change took place, possibly for a different profile.
874 - (void)themeDidChangeNotification:(NSNotification*)notification { 878 - (void)themeDidChangeNotification:(NSNotification*)notification {
875 [self updateTheme:[[[self view] window] themeProvider]]; 879 [self updateTheme:[[[self view] window] themeProvider]];
876 } 880 }
877 881
878 - (BookmarkLaunchLocation)bookmarkLaunchLocation { 882 - (BookmarkLaunchLocation)bookmarkLaunchLocation {
(...skipping 1785 matching lines...) Expand 10 before | Expand all | Expand 10 after
2664 return self; 2668 return self;
2665 return [folderController_ controllerForNode:node]; 2669 return [folderController_ controllerForNode:node];
2666 } 2670 }
2667 2671
2668 // For testing. 2672 // For testing.
2669 - (const BookmarkBarLayout&)currentLayout { 2673 - (const BookmarkBarLayout&)currentLayout {
2670 return layout_; 2674 return layout_;
2671 } 2675 }
2672 2676
2673 @end 2677 @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