OLD | NEW |
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/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/mac/scoped_nsobject.h" | 8 #import "base/mac/scoped_nsobject.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/time/time.h" | 10 #include "base/time/time.h" |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 } | 66 } |
67 | 67 |
68 - (id)initWithProfile:(Profile*)aProfile { | 68 - (id)initWithProfile:(Profile*)aProfile { |
69 if (!aProfile) { | 69 if (!aProfile) { |
70 [self release]; | 70 [self release]; |
71 return nil; | 71 return nil; |
72 } | 72 } |
73 | 73 |
74 if ((self = [super init])) { | 74 if ((self = [super init])) { |
75 browser_ = new Browser( | 75 browser_ = new Browser( |
76 Browser::CreateParams(aProfile, chrome::HOST_DESKTOP_TYPE_NATIVE)); | 76 Browser::CreateParams(aProfile, ui::HOST_DESKTOP_TYPE_NATIVE)); |
77 chrome::NewTab(browser_); | 77 chrome::NewTab(browser_); |
78 browser_->window()->Show(); | 78 browser_->window()->Show(); |
79 base::scoped_nsobject<NSNumber> numID( | 79 base::scoped_nsobject<NSNumber> numID( |
80 [[NSNumber alloc] initWithInt:browser_->session_id().id()]); | 80 [[NSNumber alloc] initWithInt:browser_->session_id().id()]); |
81 [self setUniqueID:numID]; | 81 [self setUniqueID:numID]; |
82 } | 82 } |
83 return self; | 83 return self; |
84 } | 84 } |
85 | 85 |
86 - (id)initWithBrowser:(Browser*)aBrowser { | 86 - (id)initWithBrowser:(Browser*)aBrowser { |
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
273 } | 273 } |
274 | 274 |
275 - (void)handlesExitPresentationMode:(NSScriptCommand*)command { | 275 - (void)handlesExitPresentationMode:(NSScriptCommand*)command { |
276 AppleScript::LogAppleScriptUMA( | 276 AppleScript::LogAppleScriptUMA( |
277 AppleScript::AppleScriptCommand::WINDOW_EXIT_PRESENTATION_MODE); | 277 AppleScript::AppleScriptCommand::WINDOW_EXIT_PRESENTATION_MODE); |
278 if (browser_->window()) | 278 if (browser_->window()) |
279 browser_->window()->ExitFullscreen(); | 279 browser_->window()->ExitFullscreen(); |
280 } | 280 } |
281 | 281 |
282 @end | 282 @end |
OLD | NEW |