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

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

Issue 171413002: linux_aura: Keep GTK state from leaking between profiles. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix mac compile. Created 6 years, 10 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 {
31 return true;
32 }
33
30 gfx::ImageSkia* BackgroundTheme::GetImageSkiaNamed(int id) const { 34 gfx::ImageSkia* BackgroundTheme::GetImageSkiaNamed(int id) const {
31 return NULL; 35 return NULL;
32 } 36 }
33 37
34 SkColor BackgroundTheme::GetColor(int id) const { 38 SkColor BackgroundTheme::GetColor(int id) const {
35 return SkColor(); 39 return SkColor();
36 } 40 }
37 41
38 int BackgroundTheme::GetDisplayProperty(int id) const { 42 int BackgroundTheme::GetDisplayProperty(int id) const {
39 return -1; 43 return -1;
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 return buttonGradient_.get(); 83 return buttonGradient_.get();
80 case ThemeProperties::GRADIENT_TOOLBAR_BUTTON_PRESSED: 84 case ThemeProperties::GRADIENT_TOOLBAR_BUTTON_PRESSED:
81 case ThemeProperties::GRADIENT_TOOLBAR_BUTTON_PRESSED_INACTIVE: 85 case ThemeProperties::GRADIENT_TOOLBAR_BUTTON_PRESSED_INACTIVE:
82 return buttonPressedGradient_.get(); 86 return buttonPressedGradient_.get();
83 default: 87 default:
84 return provider_->GetNSGradient(id); 88 return provider_->GetNSGradient(id);
85 } 89 }
86 } 90 }
87 91
88 92
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/download/background_theme.h ('k') | chrome/browser/ui/libgtk2ui/gtk2_border.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698