| OLD | NEW |
| 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 #include "chrome/browser/ui/cocoa/background_gradient_view.h" | 5 #include "chrome/browser/ui/cocoa/background_gradient_view.h" |
| 6 | 6 |
| 7 #import "chrome/browser/themes/theme_service.h" | 7 #import "chrome/browser/themes/theme_service.h" |
| 8 #import "chrome/browser/ui/cocoa/nsview_additions.h" | 8 #import "chrome/browser/ui/cocoa/nsview_additions.h" |
| 9 #import "chrome/browser/ui/cocoa/themed_window.h" | 9 #import "chrome/browser/ui/cocoa/themed_window.h" |
| 10 #include "grit/theme_resources.h" | 10 #include "grit/theme_resources.h" |
| 11 #include "grit/theme_resources_standard.h" |
| 11 | 12 |
| 12 #define kToolbarTopOffset 12 | 13 #define kToolbarTopOffset 12 |
| 13 #define kToolbarMaxHeight 100 | 14 #define kToolbarMaxHeight 100 |
| 14 | 15 |
| 15 @implementation BackgroundGradientView | 16 @implementation BackgroundGradientView |
| 16 @synthesize showsDivider = showsDivider_; | 17 @synthesize showsDivider = showsDivider_; |
| 17 | 18 |
| 18 - (id)initWithFrame:(NSRect)frameRect { | 19 - (id)initWithFrame:(NSRect)frameRect { |
| 19 self = [super initWithFrame:frameRect]; | 20 self = [super initWithFrame:frameRect]; |
| 20 if (self != nil) { | 21 if (self != nil) { |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 BOOL isKey = [[self window] isKeyWindow]; | 75 BOOL isKey = [[self window] isKeyWindow]; |
| 75 ui::ThemeProvider* themeProvider = [[self window] themeProvider]; | 76 ui::ThemeProvider* themeProvider = [[self window] themeProvider]; |
| 76 if (!themeProvider) | 77 if (!themeProvider) |
| 77 return [NSColor blackColor]; | 78 return [NSColor blackColor]; |
| 78 return themeProvider->GetNSColor( | 79 return themeProvider->GetNSColor( |
| 79 isKey ? ThemeService::COLOR_TOOLBAR_STROKE : | 80 isKey ? ThemeService::COLOR_TOOLBAR_STROKE : |
| 80 ThemeService::COLOR_TOOLBAR_STROKE_INACTIVE, true); | 81 ThemeService::COLOR_TOOLBAR_STROKE_INACTIVE, true); |
| 81 } | 82 } |
| 82 | 83 |
| 83 @end | 84 @end |
| OLD | NEW |