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

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

Issue 2008403002: [Mac][Material Design] Restore apps page shortcut icon in bookmarks bar. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2743
Patch Set: Created 4 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
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 893 matching lines...) Expand 10 before | Expand all | Expand 10 after
904 // Click on the "off the side" button (chevron), which opens like a folder 904 // Click on the "off the side" button (chevron), which opens like a folder
905 // button but isn't exactly a parent folder. 905 // button but isn't exactly a parent folder.
906 - (IBAction)openOffTheSideFolderFromButton:(id)sender { 906 - (IBAction)openOffTheSideFolderFromButton:(id)sender {
907 [self openBookmarkFolder:sender]; 907 [self openBookmarkFolder:sender];
908 } 908 }
909 909
910 - (IBAction)importBookmarks:(id)sender { 910 - (IBAction)importBookmarks:(id)sender {
911 chrome::ShowImportDialog(browser_); 911 chrome::ShowImportDialog(browser_);
912 } 912 }
913 913
914 - (NSButton*)appsPageShortcutButton {
915 return appsPageShortcutButton_;
916 }
917
914 - (NSButton*)offTheSideButton { 918 - (NSButton*)offTheSideButton {
915 return offTheSideButton_; 919 return offTheSideButton_;
916 } 920 }
917 921
918 - (NSImage*)offTheSideButtonImage:(BOOL)forDarkMode { 922 - (NSImage*)offTheSideButtonImage:(BOOL)forDarkMode {
919 const int kIconSize = 8; 923 const int kIconSize = 8;
920 SkColor vectorIconColor = forDarkMode ? SkColorSetA(SK_ColorWHITE, 0xCC) 924 SkColor vectorIconColor = forDarkMode ? SkColorSetA(SK_ColorWHITE, 0xCC)
921 : gfx::kChromeIconGrey; 925 : gfx::kChromeIconGrey;
922 return NSImageFromImageSkia( 926 return NSImageFromImageSkia(
923 gfx::CreateVectorIcon(gfx::VectorIconId::OVERFLOW_CHEVRON, 927 gfx::CreateVectorIcon(gfx::VectorIconId::OVERFLOW_CHEVRON,
(...skipping 960 matching lines...) Expand 10 before | Expand all | Expand 10 after
1884 #pragma mark Private Methods Exposed for Testing 1888 #pragma mark Private Methods Exposed for Testing
1885 1889
1886 - (BookmarkBarView*)buttonView { 1890 - (BookmarkBarView*)buttonView {
1887 return buttonView_; 1891 return buttonView_;
1888 } 1892 }
1889 1893
1890 - (NSMutableArray*)buttons { 1894 - (NSMutableArray*)buttons {
1891 return buttons_.get(); 1895 return buttons_.get();
1892 } 1896 }
1893 1897
1894 - (NSButton*)appsPageShortcutButton {
1895 return appsPageShortcutButton_;
1896 }
1897
1898 - (BOOL)offTheSideButtonIsHidden { 1898 - (BOOL)offTheSideButtonIsHidden {
1899 return [offTheSideButton_ isHidden]; 1899 return [offTheSideButton_ isHidden];
1900 } 1900 }
1901 1901
1902 - (BOOL)appsPageShortcutButtonIsHidden { 1902 - (BOOL)appsPageShortcutButtonIsHidden {
1903 return [appsPageShortcutButton_ isHidden]; 1903 return [appsPageShortcutButton_ isHidden];
1904 } 1904 }
1905 1905
1906 - (BookmarkButton*)otherBookmarksButton { 1906 - (BookmarkButton*)otherBookmarksButton {
1907 return otherBookmarksButton_.get(); 1907 return otherBookmarksButton_.get();
(...skipping 1182 matching lines...) Expand 10 before | Expand all | Expand 10 after
3090 - (id<BookmarkButtonControllerProtocol>)controllerForNode: 3090 - (id<BookmarkButtonControllerProtocol>)controllerForNode:
3091 (const BookmarkNode*)node { 3091 (const BookmarkNode*)node {
3092 // See if it's in the bar, then if it is in the hierarchy of visible 3092 // See if it's in the bar, then if it is in the hierarchy of visible
3093 // folder menus. 3093 // folder menus.
3094 if (bookmarkModel_->bookmark_bar_node() == node) 3094 if (bookmarkModel_->bookmark_bar_node() == node)
3095 return self; 3095 return self;
3096 return [folderController_ controllerForNode:node]; 3096 return [folderController_ controllerForNode:node];
3097 } 3097 }
3098 3098
3099 @end 3099 @end
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.h ('k') | chrome/browser/ui/cocoa/bookmarks/bookmark_button.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698