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

Side by Side Diff: content/shell/renderer/test_runner/WebTestThemeEngineMac.mm

Issue 177243021: [Mac] Remove NSApplication from the renderer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Defer FakeActiveWindow creation Created 6 years, 9 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
« no previous file with comments | « content/renderer/renderer_main_platform_delegate_mac.mm ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « content/renderer/renderer_main_platform_delegate_mac.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698