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

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

Issue 12018007: Refactor BrowserWindow fullscreen and presentation on Mac to be consistent with other platforms. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge TOT Created 7 years, 10 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
« no previous file with comments | « chrome/browser/ui/browser_window.h ('k') | chrome/browser/ui/cocoa/browser_window_cocoa.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/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
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
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser_window.h ('k') | chrome/browser/ui/cocoa/browser_window_cocoa.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698