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/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 1956 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1967 | 1967 |
1968 // Presentation mode on Leopard and Snow Leopard maps directly to fullscreen | 1968 // Presentation mode on Leopard and Snow Leopard maps directly to fullscreen |
1969 // mode. | 1969 // mode. |
1970 if (base::mac::IsOSSnowLeopardOrEarlier()) { | 1970 if (base::mac::IsOSSnowLeopardOrEarlier()) { |
1971 [self setFullscreen:presentationMode url:url bubbleType:bubbleType]; | 1971 [self setFullscreen:presentationMode url:url bubbleType:bubbleType]; |
1972 return; | 1972 return; |
1973 } | 1973 } |
1974 | 1974 |
1975 if (presentationMode) { | 1975 if (presentationMode) { |
1976 BOOL fullscreen = [self isFullscreen]; | 1976 BOOL fullscreen = [self isFullscreen]; |
1977 BOOL fullscreen_for_tab = browser_->IsFullscreenForTab(); | 1977 BOOL fullscreen_for_tab = browser_->IsFullscreenForTabOrPending(); |
1978 if (!fullscreen_for_tab) | 1978 if (!fullscreen_for_tab) |
1979 [self setShouldUsePresentationModeWhenEnteringFullscreen:YES]; | 1979 [self setShouldUsePresentationModeWhenEnteringFullscreen:YES]; |
1980 enteredPresentationModeFromFullscreen_ = fullscreen; | 1980 enteredPresentationModeFromFullscreen_ = fullscreen; |
1981 | 1981 |
1982 if (fullscreen) { | 1982 if (fullscreen) { |
1983 // If already in fullscreen mode, just toggle the presentation mode | 1983 // If already in fullscreen mode, just toggle the presentation mode |
1984 // setting. Go through an elaborate dance to force the overlay to show, | 1984 // setting. Go through an elaborate dance to force the overlay to show, |
1985 // then animate out once the mouse moves away. This helps draw attention | 1985 // then animate out once the mouse moves away. This helps draw attention |
1986 // to the fact that the UI is in an overlay. Focus the tab contents | 1986 // to the fact that the UI is in an overlay. Focus the tab contents |
1987 // because the omnibox is the most likely source of bar visibility locks, | 1987 // because the omnibox is the most likely source of bar visibility locks, |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2163 | 2163 |
2164 - (BOOL)supportsBookmarkBar { | 2164 - (BOOL)supportsBookmarkBar { |
2165 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR]; | 2165 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR]; |
2166 } | 2166 } |
2167 | 2167 |
2168 - (BOOL)isTabbedWindow { | 2168 - (BOOL)isTabbedWindow { |
2169 return browser_->is_type_tabbed(); | 2169 return browser_->is_type_tabbed(); |
2170 } | 2170 } |
2171 | 2171 |
2172 @end // @implementation BrowserWindowController(WindowType) | 2172 @end // @implementation BrowserWindowController(WindowType) |
OLD | NEW |