| 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/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 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 242 | 242 |
| 243 - (void)handlesCloseScriptCommand:(NSCloseCommand*)command { | 243 - (void)handlesCloseScriptCommand:(NSCloseCommand*)command { |
| 244 // window() can be NULL during startup. | 244 // window() can be NULL during startup. |
| 245 if (browser_->window()) | 245 if (browser_->window()) |
| 246 browser_->window()->Close(); | 246 browser_->window()->Close(); |
| 247 } | 247 } |
| 248 | 248 |
| 249 - (NSNumber*)presenting { | 249 - (NSNumber*)presenting { |
| 250 BOOL presentingValue = NO; | 250 BOOL presentingValue = NO; |
| 251 if (browser_->window()) | 251 if (browser_->window()) |
| 252 presentingValue = browser_->window()->InPresentationMode(); | 252 presentingValue = browser_->window()->IsFullscreenWithoutChrome(); |
| 253 return [NSNumber numberWithBool:presentingValue]; | 253 return [NSNumber numberWithBool:presentingValue]; |
| 254 } | 254 } |
| 255 | 255 |
| 256 - (void)handlesEnterPresentationMode:(NSScriptCommand*)command { | 256 - (void)handlesEnterPresentationMode:(NSScriptCommand*)command { |
| 257 if (browser_->window()) { | 257 if (browser_->window()) { |
| 258 browser_->window()->EnterPresentationMode( | 258 browser_->window()->EnterFullscreen( |
| 259 GURL(), FEB_TYPE_FULLSCREEN_EXIT_INSTRUCTION); | 259 GURL(), FEB_TYPE_FULLSCREEN_EXIT_INSTRUCTION); |
| 260 } | 260 } |
| 261 } | 261 } |
| 262 | 262 |
| 263 - (void)handlesExitPresentationMode:(NSScriptCommand*)command { | 263 - (void)handlesExitPresentationMode:(NSScriptCommand*)command { |
| 264 if (browser_->window()) | 264 if (browser_->window()) |
| 265 browser_->window()->ExitPresentationMode(); | 265 browser_->window()->ExitFullscreen(); |
| 266 } | 266 } |
| 267 | 267 |
| 268 @end | 268 @end |
| OLD | NEW |