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

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: nits 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 1969 matching lines...) Expand 10 before | Expand all | Expand 10 after
1980 1980
1981 // Presentation mode on Leopard and Snow Leopard maps directly to fullscreen 1981 // Presentation mode on Leopard and Snow Leopard maps directly to fullscreen
1982 // mode. 1982 // mode.
1983 if (base::mac::IsOSSnowLeopardOrEarlier()) { 1983 if (base::mac::IsOSSnowLeopardOrEarlier()) {
1984 [self setFullscreen:presentationMode url:url bubbleType:bubbleType]; 1984 [self setFullscreen:presentationMode url:url bubbleType:bubbleType];
1985 return; 1985 return;
1986 } 1986 }
1987 1987
1988 if (presentationMode) { 1988 if (presentationMode) {
1989 BOOL fullscreen = [self isFullscreen]; 1989 BOOL fullscreen = [self isFullscreen];
1990 BOOL fullscreen_for_tab = browser_->is_fullscreen_for_tab(); 1990 BOOL fullscreen_for_tab = browser_->IsFullscreenForTab();
1991 if (!fullscreen_for_tab) 1991 if (!fullscreen_for_tab)
1992 [self setShouldUsePresentationModeWhenEnteringFullscreen:YES]; 1992 [self setShouldUsePresentationModeWhenEnteringFullscreen:YES];
1993 enteredPresentationModeFromFullscreen_ = fullscreen; 1993 enteredPresentationModeFromFullscreen_ = fullscreen;
1994 1994
1995 if (fullscreen) { 1995 if (fullscreen) {
1996 // If already in fullscreen mode, just toggle the presentation mode 1996 // If already in fullscreen mode, just toggle the presentation mode
1997 // setting. Go through an elaborate dance to force the overlay to show, 1997 // setting. Go through an elaborate dance to force the overlay to show,
1998 // then animate out once the mouse moves away. This helps draw attention 1998 // then animate out once the mouse moves away. This helps draw attention
1999 // to the fact that the UI is in an overlay. Focus the tab contents 1999 // to the fact that the UI is in an overlay. Focus the tab contents
2000 // because the omnibox is the most likely source of bar visibility locks, 2000 // because the omnibox is the most likely source of bar visibility locks,
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
2176 2176
2177 - (BOOL)supportsBookmarkBar { 2177 - (BOOL)supportsBookmarkBar {
2178 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR]; 2178 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR];
2179 } 2179 }
2180 2180
2181 - (BOOL)isTabbedWindow { 2181 - (BOOL)isTabbedWindow {
2182 return browser_->is_type_tabbed(); 2182 return browser_->is_type_tabbed();
2183 } 2183 }
2184 2184
2185 @end // @implementation BrowserWindowController(WindowType) 2185 @end // @implementation BrowserWindowController(WindowType)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698