| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "content/shell/renderer/test_runner/WebTestThemeEngineMac.h" | 5 #include "content/shell/renderer/test_runner/WebTestThemeEngineMac.h" |
| 6 | 6 |
| 7 #import <AppKit/NSAffineTransform.h> | 7 #import <AppKit/NSAffineTransform.h> |
| 8 #import <AppKit/NSGraphicsContext.h> | 8 #import <AppKit/NSGraphicsContext.h> |
| 9 #import <AppKit/NSScroller.h> | 9 #import <AppKit/NSScroller.h> |
| 10 #import <AppKit/NSWindow.h> | 10 #import <AppKit/NSWindow.h> |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 | 44 |
| 45 + (NSWindow*)alwaysInactiveWindow | 45 + (NSWindow*)alwaysInactiveWindow |
| 46 { | 46 { |
| 47 if (alwaysInactiveWindow == nil) | 47 if (alwaysInactiveWindow == nil) |
| 48 alwaysInactiveWindow = [[self alloc] initWithActiveControls:NO]; | 48 alwaysInactiveWindow = [[self alloc] initWithActiveControls:NO]; |
| 49 return alwaysInactiveWindow; | 49 return alwaysInactiveWindow; |
| 50 } | 50 } |
| 51 | 51 |
| 52 - (id)initWithActiveControls:(BOOL)_hasActiveControls | 52 - (id)initWithActiveControls:(BOOL)_hasActiveControls |
| 53 { | 53 { |
| 54 self = [super init]; | 54 if ((self = [super initWithContentRect:NSMakeRect(0, 0, 100, 100) |
| 55 hasActiveControls = _hasActiveControls; | 55 styleMask:0 |
| 56 backing:NSBackingStoreBuffered |
| 57 defer:YES])) { |
| 58 hasActiveControls = _hasActiveControls; |
| 59 } |
| 56 return self; | 60 return self; |
| 57 } | 61 } |
| 58 | 62 |
| 59 - (BOOL)_hasActiveControls | 63 - (BOOL)_hasActiveControls |
| 60 { | 64 { |
| 61 return hasActiveControls; | 65 return hasActiveControls; |
| 62 } | 66 } |
| 63 | 67 |
| 64 @end | 68 @end |
| 65 | 69 |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 | 168 |
| 165 [scroller drawKnob]; | 169 [scroller drawKnob]; |
| 166 CGContextRestoreGState(cgContext); | 170 CGContextRestoreGState(cgContext); |
| 167 | 171 |
| 168 [scroller release]; | 172 [scroller release]; |
| 169 | 173 |
| 170 [NSGraphicsContext restoreGraphicsState]; | 174 [NSGraphicsContext restoreGraphicsState]; |
| 171 } | 175 } |
| 172 | 176 |
| 173 } | 177 } |
| OLD | NEW |