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

Side by Side Diff: chrome/browser/ui/cocoa/web_dialog_window_controller.mm

Issue 1154013009: [OSX] Don't create deferred windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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
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 #import "chrome/browser/ui/cocoa/web_dialog_window_controller.h" 5 #import "chrome/browser/ui/cocoa/web_dialog_window_controller.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/mac/scoped_nsobject.h" 8 #include "base/mac/scoped_nsobject.h"
9 #include "base/strings/sys_string_conversions.h" 9 #include "base/strings/sys_string_conversions.h"
10 #import "chrome/browser/ui/browser_dialogs.h" 10 #import "chrome/browser/ui/browser_dialogs.h"
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
312 gfx::Size dialogSize; 312 gfx::Size dialogSize;
313 delegate->GetDialogSize(&dialogSize); 313 delegate->GetDialogSize(&dialogSize);
314 NSRect dialogRect = NSMakeRect(0, 0, dialogSize.width(), dialogSize.height()); 314 NSRect dialogRect = NSMakeRect(0, 0, dialogSize.width(), dialogSize.height());
315 NSUInteger style = NSTitledWindowMask | NSClosableWindowMask | 315 NSUInteger style = NSTitledWindowMask | NSClosableWindowMask |
316 NSResizableWindowMask; 316 NSResizableWindowMask;
317 base::scoped_nsobject<ChromeEventProcessingWindow> window( 317 base::scoped_nsobject<ChromeEventProcessingWindow> window(
318 [[ChromeEventProcessingWindow alloc] 318 [[ChromeEventProcessingWindow alloc]
319 initWithContentRect:dialogRect 319 initWithContentRect:dialogRect
320 styleMask:style 320 styleMask:style
321 backing:NSBackingStoreBuffered 321 backing:NSBackingStoreBuffered
322 defer:YES]); 322 defer:NO]);
323 if (!window.get()) { 323 if (!window.get()) {
324 return nil; 324 return nil;
325 } 325 }
326 self = [super initWithWindow:window]; 326 self = [super initWithWindow:window];
327 if (!self) { 327 if (!self) {
328 return nil; 328 return nil;
329 } 329 }
330 [window setWindowController:self]; 330 [window setWindowController:self];
331 [window setDelegate:self]; 331 [window setDelegate:self];
332 [window setTitle:base::SysUTF16ToNSString(delegate->GetDialogTitle())]; 332 [window setTitle:base::SysUTF16ToNSString(delegate->GetDialogTitle())];
(...skipping 25 matching lines...) Expand all
358 // TODO(akalin): Figure out why implementing (void)cancel:(id)sender 358 // TODO(akalin): Figure out why implementing (void)cancel:(id)sender
359 // to do the above doesn't work. 359 // to do the above doesn't work.
360 } 360 }
361 361
362 - (void)windowWillClose:(NSNotification*)notification { 362 - (void)windowWillClose:(NSNotification*)notification {
363 delegate_->WindowControllerClosed(); 363 delegate_->WindowControllerClosed();
364 [self autorelease]; 364 [self autorelease];
365 } 365 }
366 366
367 @end 367 @end
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/tabs/tab_window_controller.mm ('k') | chrome/browser/ui/views/apps/app_window_native_widget_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698