OLD | NEW |
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 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
237 - (void)setValue:(id)value forUndefinedKey:(NSString*)key { | 237 - (void)setValue:(id)value forUndefinedKey:(NSString*)key { |
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 - (NSNumber*)presenting { |
| 248 BOOL presentingValue = NO; |
| 249 if (browser_->window()) |
| 250 presentingValue = browser_->window()->InPresentationMode(); |
| 251 return [NSNumber numberWithBool:presentingValue]; |
| 252 } |
| 253 |
| 254 - (void)handlesEnterPresentationMode:(NSScriptCommand*)command { |
| 255 if (browser_->window()) { |
| 256 browser_->window()->EnterPresentationMode( |
| 257 GURL(), FEB_TYPE_FULLSCREEN_EXIT_INSTRUCTION); |
| 258 } |
| 259 } |
| 260 |
| 261 - (void)handlesExitPresentationMode:(NSScriptCommand*)command { |
| 262 if (browser_->window()) |
| 263 browser_->window()->ExitPresentationMode(); |
| 264 } |
| 265 |
247 @end | 266 @end |
OLD | NEW |