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

Side by Side Diff: chrome/browser/ui/cocoa/toolbar/toolbar_button_cocoa.mm

Issue 2035153002: Revert of [Mac][Material Design] Bring Omnibox stroke and MD colors up to spec. (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 | « chrome/browser/ui/cocoa/tabs/tab_view.mm ('k') | 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/toolbar/toolbar_button_cocoa.h" 5 #import "chrome/browser/ui/cocoa/toolbar/toolbar_button_cocoa.h"
6 6
7 #include "base/mac/foundation_util.h" 7 #include "base/mac/foundation_util.h"
8 #include "base/mac/sdk_forward_declarations.h" 8 #include "base/mac/sdk_forward_declarations.h"
9 #import "chrome/browser/ui/cocoa/image_button_cell.h" 9 #import "chrome/browser/ui/cocoa/image_button_cell.h"
10 #import "chrome/browser/ui/cocoa/view_id_util.h" 10 #import "chrome/browser/ui/cocoa/view_id_util.h"
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 return themeIsDark ? SK_ColorWHITE : SkColorSetRGB(0x5A, 0x5A, 0x5A); 228 return themeIsDark ? SK_ColorWHITE : SkColorSetRGB(0x5A, 0x5A, 0x5A);
229 } 229 }
230 230
231 - (NSImage*)browserToolsIconForFillColor:(SkColor)fillColor { 231 - (NSImage*)browserToolsIconForFillColor:(SkColor)fillColor {
232 // Create a |BrowserToolsImageRep| to draw the browser tools icon using 232 // Create a |BrowserToolsImageRep| to draw the browser tools icon using
233 // the provided fill color. 233 // the provided fill color.
234 base::scoped_nsobject<BrowserToolsImageRep> imageRep = 234 base::scoped_nsobject<BrowserToolsImageRep> imageRep =
235 [[BrowserToolsImageRep alloc] 235 [[BrowserToolsImageRep alloc]
236 initWithDrawSelector:@selector(drawBrowserToolsIcon:) 236 initWithDrawSelector:@selector(drawBrowserToolsIcon:)
237 delegate:[BrowserToolsImageRep class]]; 237 delegate:[BrowserToolsImageRep class]];
238 if (!ui::MaterialDesignController::IsModeMaterial()) { 238 [imageRep setFillColor:skia::SkColorToCalibratedNSColor(fillColor)];
239 [imageRep setFillColor:skia::SkColorToCalibratedNSColor(fillColor)];
240 } else {
241 [imageRep setFillColor:skia::SkColorToSRGBNSColor(fillColor)];
242 }
243 239
244 // Create the image from the image rep. 240 // Create the image from the image rep.
245 NSImage* browserToolsIcon = 241 NSImage* browserToolsIcon =
246 [[[NSImage alloc] initWithSize:kMDButtonIconSize] autorelease]; 242 [[[NSImage alloc] initWithSize:kMDButtonIconSize] autorelease];
247 [browserToolsIcon setCacheMode:NSImageCacheAlways]; 243 [browserToolsIcon setCacheMode:NSImageCacheAlways];
248 [browserToolsIcon addRepresentation:imageRep]; 244 [browserToolsIcon addRepresentation:imageRep];
249 245
250 return browserToolsIcon; 246 return browserToolsIcon;
251 } 247 }
252 248
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
394 // Update the hover and pressed image backgrounds to match the current theme. 390 // Update the hover and pressed image backgrounds to match the current theme.
395 if (ui::MaterialDesignController::IsModeMaterial()) { 391 if (ui::MaterialDesignController::IsModeMaterial()) {
396 [self resetButtonStateImages]; 392 [self resetButtonStateImages];
397 } 393 }
398 } 394 }
399 395
400 - (void)windowDidChangeActive { 396 - (void)windowDidChangeActive {
401 } 397 }
402 398
403 @end 399 @end
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/tabs/tab_view.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698