| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |