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

Side by Side Diff: chrome/browser/ui/cocoa/download/background_theme.mm

Issue 244893004: Improve some naming (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync Created 6 years, 8 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 | Annotate | Revision Log
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 #include "chrome/browser/ui/cocoa/download/background_theme.h" 5 #include "chrome/browser/ui/cocoa/download/background_theme.h"
6 6
7 #import "chrome/browser/themes/theme_properties.h" 7 #import "chrome/browser/themes/theme_properties.h"
8 8
9 BackgroundTheme::BackgroundTheme(ui::ThemeProvider* provider) : 9 BackgroundTheme::BackgroundTheme(ui::ThemeProvider* provider) :
10 provider_(provider) { 10 provider_(provider) {
11 NSColor* bgColor = [NSColor colorWithCalibratedRed:241/255.0 11 NSColor* bgColor = [NSColor colorWithCalibratedRed:241/255.0
12 green:245/255.0 12 green:245/255.0
13 blue:250/255.0 13 blue:250/255.0
14 alpha:77/255.0]; 14 alpha:77/255.0];
15 NSColor* clickedColor = [NSColor colorWithCalibratedRed:239/255.0 15 NSColor* clickedColor = [NSColor colorWithCalibratedRed:239/255.0
16 green:245/255.0 16 green:245/255.0
17 blue:252/255.0 17 blue:252/255.0
18 alpha:51/255.0]; 18 alpha:51/255.0];
19 19
20 borderColor_.reset( 20 borderColor_.reset(
21 [[NSColor colorWithCalibratedWhite:0 alpha:36/255.0] retain]); 21 [[NSColor colorWithCalibratedWhite:0 alpha:36/255.0] retain]);
22 buttonGradient_.reset([[NSGradient alloc] 22 buttonGradient_.reset([[NSGradient alloc]
23 initWithColors:[NSArray arrayWithObject:bgColor]]); 23 initWithColors:[NSArray arrayWithObject:bgColor]]);
24 buttonPressedGradient_.reset([[NSGradient alloc] 24 buttonPressedGradient_.reset([[NSGradient alloc]
25 initWithColors:[NSArray arrayWithObject:clickedColor]]); 25 initWithColors:[NSArray arrayWithObject:clickedColor]]);
26 } 26 }
27 27
28 BackgroundTheme::~BackgroundTheme() {} 28 BackgroundTheme::~BackgroundTheme() {}
29 29
30 bool BackgroundTheme::UsingNativeTheme() const { 30 bool BackgroundTheme::UsingSystemTheme() const {
31 return true; 31 return true;
32 } 32 }
33 33
34 gfx::ImageSkia* BackgroundTheme::GetImageSkiaNamed(int id) const { 34 gfx::ImageSkia* BackgroundTheme::GetImageSkiaNamed(int id) const {
35 return NULL; 35 return NULL;
36 } 36 }
37 37
38 SkColor BackgroundTheme::GetColor(int id) const { 38 SkColor BackgroundTheme::GetColor(int id) const {
39 return SkColor(); 39 return SkColor();
40 } 40 }
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 return buttonGradient_.get(); 83 return buttonGradient_.get();
84 case ThemeProperties::GRADIENT_TOOLBAR_BUTTON_PRESSED: 84 case ThemeProperties::GRADIENT_TOOLBAR_BUTTON_PRESSED:
85 case ThemeProperties::GRADIENT_TOOLBAR_BUTTON_PRESSED_INACTIVE: 85 case ThemeProperties::GRADIENT_TOOLBAR_BUTTON_PRESSED_INACTIVE:
86 return buttonPressedGradient_.get(); 86 return buttonPressedGradient_.get();
87 default: 87 default:
88 return provider_->GetNSGradient(id); 88 return provider_->GetNSGradient(id);
89 } 89 }
90 } 90 }
91 91
92 92
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698