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

Side by Side Diff: content/shell/shell_mac.mm

Issue 15983002: [content shell] When running layout tests on mac, move the window off-screen (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 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 | « no previous file | 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 (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 "content/shell/shell.h" 5 #include "content/shell/shell.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #import "base/memory/scoped_nsobject.h" 10 #import "base/memory/scoped_nsobject.h"
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 } 157 }
158 158
159 void Shell::PlatformCreateWindow(int width, int height) { 159 void Shell::PlatformCreateWindow(int width, int height) {
160 NSRect initial_window_bounds = 160 NSRect initial_window_bounds =
161 NSMakeRect(0, 0, width, height + kURLBarHeight); 161 NSMakeRect(0, 0, width, height + kURLBarHeight);
162 NSRect content_rect = initial_window_bounds; 162 NSRect content_rect = initial_window_bounds;
163 NSUInteger style_mask = NSTitledWindowMask | 163 NSUInteger style_mask = NSTitledWindowMask |
164 NSClosableWindowMask | 164 NSClosableWindowMask |
165 NSMiniaturizableWindowMask | 165 NSMiniaturizableWindowMask |
166 NSResizableWindowMask; 166 NSResizableWindowMask;
167 if (headless_) {
168 content_rect = NSOffsetRect(initial_window_bounds, -10000, -10000);
169 style_mask = NSBorderlessWindowMask;
170 }
167 CrShellWindow* window = 171 CrShellWindow* window =
168 [[CrShellWindow alloc] initWithContentRect:content_rect 172 [[CrShellWindow alloc] initWithContentRect:content_rect
169 styleMask:style_mask 173 styleMask:style_mask
170 backing:NSBackingStoreBuffered 174 backing:NSBackingStoreBuffered
171 defer:NO]; 175 defer:NO];
172 window_ = window; 176 window_ = window;
173 [window setShell:this]; 177 [window setShell:this];
174 [window_ setTitle:kWindowTitle]; 178 [window_ setTitle:kWindowTitle];
175 NSView* content = [window_ contentView]; 179 NSView* content = [window_ contentView];
176 180
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 [[event.os_event characters] isEqual:@"l"]) { 294 [[event.os_event characters] isEqual:@"l"]) {
291 [window_ makeFirstResponder:url_edit_view_]; 295 [window_ makeFirstResponder:url_edit_view_];
292 return; 296 return;
293 } 297 }
294 298
295 [[NSApp mainMenu] performKeyEquivalent:event.os_event]; 299 [[NSApp mainMenu] performKeyEquivalent:event.os_event];
296 } 300 }
297 } 301 }
298 302
299 } // namespace content 303 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698