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

Side by Side Diff: chrome/browser/ui/cocoa/browser_window_controller.mm

Issue 8423035: Split out fullscreen logic from Browser into FullscreenController. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 9 years, 1 month 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/browser_window_controller.h" 5 #import "chrome/browser/ui/cocoa/browser_window_controller.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 #include <numeric> 8 #include <numeric>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 1970 matching lines...) Expand 10 before | Expand all | Expand 10 after
1981 1981
1982 // Presentation mode on Leopard and Snow Leopard maps directly to fullscreen 1982 // Presentation mode on Leopard and Snow Leopard maps directly to fullscreen
1983 // mode. 1983 // mode.
1984 if (base::mac::IsOSSnowLeopardOrEarlier()) { 1984 if (base::mac::IsOSSnowLeopardOrEarlier()) {
1985 [self setFullscreen:presentationMode url:url bubbleType:bubbleType]; 1985 [self setFullscreen:presentationMode url:url bubbleType:bubbleType];
1986 return; 1986 return;
1987 } 1987 }
1988 1988
1989 if (presentationMode) { 1989 if (presentationMode) {
1990 BOOL fullscreen = [self isFullscreen]; 1990 BOOL fullscreen = [self isFullscreen];
1991 BOOL fullscreen_for_tab = browser_->is_fullscreen_for_tab(); 1991 BOOL fullscreen_for_tab = browser_->IsFullscreenForTab();
1992 if (!fullscreen_for_tab) 1992 if (!fullscreen_for_tab)
1993 [self setShouldUsePresentationModeWhenEnteringFullscreen:YES]; 1993 [self setShouldUsePresentationModeWhenEnteringFullscreen:YES];
1994 enteredPresentationModeFromFullscreen_ = fullscreen; 1994 enteredPresentationModeFromFullscreen_ = fullscreen;
1995 1995
1996 if (fullscreen) { 1996 if (fullscreen) {
1997 // If already in fullscreen mode, just toggle the presentation mode 1997 // If already in fullscreen mode, just toggle the presentation mode
1998 // setting. Go through an elaborate dance to force the overlay to show, 1998 // setting. Go through an elaborate dance to force the overlay to show,
1999 // then animate out once the mouse moves away. This helps draw attention 1999 // then animate out once the mouse moves away. This helps draw attention
2000 // to the fact that the UI is in an overlay. Focus the tab contents 2000 // to the fact that the UI is in an overlay. Focus the tab contents
2001 // because the omnibox is the most likely source of bar visibility locks, 2001 // because the omnibox is the most likely source of bar visibility locks,
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
2177 2177
2178 - (BOOL)supportsBookmarkBar { 2178 - (BOOL)supportsBookmarkBar {
2179 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR]; 2179 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR];
2180 } 2180 }
2181 2181
2182 - (BOOL)isTabbedWindow { 2182 - (BOOL)isTabbedWindow {
2183 return browser_->is_type_tabbed(); 2183 return browser_->is_type_tabbed();
2184 } 2184 }
2185 2185
2186 @end // @implementation BrowserWindowController(WindowType) 2186 @end // @implementation BrowserWindowController(WindowType)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698