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

Side by Side Diff: chrome/browser/ui/cocoa/applescript/window_applescript.mm

Issue 7809013: Remove Animation When "Resuming" Window in Lion (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Adds context parameter to BrowserWindow::Show(...) Created 9 years, 3 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/applescript/window_applescript.h" 5 #import "chrome/browser/ui/cocoa/applescript/window_applescript.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #import "base/memory/scoped_nsobject.h" 8 #import "base/memory/scoped_nsobject.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/time.h" 10 #include "base/time.h"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 63
64 - (id)initWithProfile:(Profile*)aProfile { 64 - (id)initWithProfile:(Profile*)aProfile {
65 if (!aProfile) { 65 if (!aProfile) {
66 [self release]; 66 [self release];
67 return nil; 67 return nil;
68 } 68 }
69 69
70 if ((self = [super init])) { 70 if ((self = [super init])) {
71 browser_ = Browser::Create(aProfile); 71 browser_ = Browser::Create(aProfile);
72 browser_->NewTab(); 72 browser_->NewTab();
73 browser_->window()->Show(); 73 browser_->window()->Show(BrowserWindow::SHOW_CONTEXT_NORMAL);
74 scoped_nsobject<NSNumber> numID( 74 scoped_nsobject<NSNumber> numID(
75 [[NSNumber alloc] initWithInt:browser_->session_id().id()]); 75 [[NSNumber alloc] initWithInt:browser_->session_id().id()]);
76 [self setUniqueID:numID]; 76 [self setUniqueID:numID];
77 } 77 }
78 return self; 78 return self;
79 } 79 }
80 80
81 - (id)initWithBrowser:(Browser*)aBrowser { 81 - (id)initWithBrowser:(Browser*)aBrowser {
82 if (!aBrowser) { 82 if (!aBrowser) {
83 [self release]; 83 [self release];
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 [[self nativeHandle] setValue:(id)value forKey:key]; 238 [[self nativeHandle] setValue:(id)value forKey:key];
239 } 239 }
240 240
241 - (void)handlesCloseScriptCommand:(NSCloseCommand*)command { 241 - (void)handlesCloseScriptCommand:(NSCloseCommand*)command {
242 // window() can be NULL during startup. 242 // window() can be NULL during startup.
243 if (browser_->window()) 243 if (browser_->window())
244 browser_->window()->Close(); 244 browser_->window()->Close();
245 } 245 }
246 246
247 @end 247 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698