| OLD | NEW |
| 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/background_gradient_view.h" | 5 #include "chrome/browser/ui/cocoa/background_gradient_view.h" |
| 6 | 6 |
| 7 #import "chrome/browser/themes/theme_properties.h" | 7 #import "chrome/browser/themes/theme_properties.h" |
| 8 #import "chrome/browser/themes/theme_service.h" | 8 #import "chrome/browser/themes/theme_service.h" |
| 9 #import "chrome/browser/ui/cocoa/nsview_additions.h" | |
| 10 #import "chrome/browser/ui/cocoa/themed_window.h" | 9 #import "chrome/browser/ui/cocoa/themed_window.h" |
| 11 #include "grit/theme_resources.h" | 10 #include "grit/theme_resources.h" |
| 11 #import "ui/base/cocoa/nsview_additions.h" |
| 12 | 12 |
| 13 @interface BackgroundGradientView (Private) | 13 @interface BackgroundGradientView (Private) |
| 14 - (void)commonInit; | 14 - (void)commonInit; |
| 15 - (NSColor*)backgroundImageColor; | 15 - (NSColor*)backgroundImageColor; |
| 16 @end | 16 @end |
| 17 | 17 |
| 18 @implementation BackgroundGradientView | 18 @implementation BackgroundGradientView |
| 19 | 19 |
| 20 @synthesize showsDivider = showsDivider_; | 20 @synthesize showsDivider = showsDivider_; |
| 21 | 21 |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 - (void)setFrameOrigin:(NSPoint)origin { | 153 - (void)setFrameOrigin:(NSPoint)origin { |
| 154 // The background color depends on the view's vertical position. This impacts | 154 // The background color depends on the view's vertical position. This impacts |
| 155 // any child views that draw using this view's functions. | 155 // any child views that draw using this view's functions. |
| 156 if (NSMinY([self frame]) != origin.y) | 156 if (NSMinY([self frame]) != origin.y) |
| 157 [self cr_recursivelySetNeedsDisplay:YES]; | 157 [self cr_recursivelySetNeedsDisplay:YES]; |
| 158 | 158 |
| 159 [super setFrameOrigin:origin]; | 159 [super setFrameOrigin:origin]; |
| 160 } | 160 } |
| 161 | 161 |
| 162 @end | 162 @end |
| OLD | NEW |