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

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

Issue 2028593003: [Mac][Material Design] Restore bookmark icons to default favicon. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2743
Patch Set: Created 4 years, 6 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 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 311
312 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); 312 ResourceBundle& rb = ResourceBundle::GetSharedInstance();
313 folderImage_.reset( 313 folderImage_.reset(
314 rb.GetNativeImageNamed(IDR_BOOKMARK_BAR_FOLDER).CopyNSImage()); 314 rb.GetNativeImageNamed(IDR_BOOKMARK_BAR_FOLDER).CopyNSImage());
315 if (ui::MaterialDesignController::IsModeMaterial()) { 315 if (ui::MaterialDesignController::IsModeMaterial()) {
316 folderImageWhite_.reset( 316 folderImageWhite_.reset(
317 rb.GetNativeImageNamed(IDR_BOOKMARK_BAR_FOLDER_WHITE).CopyNSImage()); 317 rb.GetNativeImageNamed(IDR_BOOKMARK_BAR_FOLDER_WHITE).CopyNSImage());
318 318
319 const int kIconSize = 16; 319 const int kIconSize = 16;
320 defaultImage_.reset([NSImageFromImageSkia( 320 defaultImage_.reset([NSImageFromImageSkia(
321 gfx::CreateVectorIcon(gfx::VectorIconId::LOCATION_BAR_HTTP, 321 gfx::CreateVectorIcon(gfx::VectorIconId::OMNIBOX_HTTP,
322 kIconSize, 322 kIconSize,
323 gfx::kChromeIconGrey)) retain]); 323 gfx::kChromeIconGrey)) retain]);
324 defaultImageIncognito_.reset([NSImageFromImageSkia( 324 defaultImageIncognito_.reset([NSImageFromImageSkia(
325 gfx::CreateVectorIcon(gfx::VectorIconId::LOCATION_BAR_HTTP, 325 gfx::CreateVectorIcon(gfx::VectorIconId::OMNIBOX_HTTP,
326 kIconSize, 326 kIconSize,
327 SkColorSetA(SK_ColorWHITE, 0xCC))) retain]); 327 SkColorSetA(SK_ColorWHITE, 0xCC))) retain]);
328 } else { 328 } else {
329 defaultImage_.reset( 329 defaultImage_.reset(
330 rb.GetNativeImageNamed(IDR_DEFAULT_FAVICON).CopyNSImage()); 330 rb.GetNativeImageNamed(IDR_DEFAULT_FAVICON).CopyNSImage());
331 defaultImageIncognito_.reset([defaultImage_.get() retain]); 331 defaultImageIncognito_.reset([defaultImage_.get() retain]);
332 } 332 }
333 333
334 innerContentAnimationsEnabled_ = YES; 334 innerContentAnimationsEnabled_ = YES;
335 stateAnimationsEnabled_ = YES; 335 stateAnimationsEnabled_ = YES;
(...skipping 2746 matching lines...) Expand 10 before | Expand all | Expand 10 after
3082 - (id<BookmarkButtonControllerProtocol>)controllerForNode: 3082 - (id<BookmarkButtonControllerProtocol>)controllerForNode:
3083 (const BookmarkNode*)node { 3083 (const BookmarkNode*)node {
3084 // See if it's in the bar, then if it is in the hierarchy of visible 3084 // See if it's in the bar, then if it is in the hierarchy of visible
3085 // folder menus. 3085 // folder menus.
3086 if (bookmarkModel_->bookmark_bar_node() == node) 3086 if (bookmarkModel_->bookmark_bar_node() == node)
3087 return self; 3087 return self;
3088 return [folderController_ controllerForNode:node]; 3088 return [folderController_ controllerForNode:node];
3089 } 3089 }
3090 3090
3091 @end 3091 @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