| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 2079 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2090 } else { | 2090 } else { |
| 2091 // Need to invoke AppKit Fullscreen API. Presentation mode will | 2091 // Need to invoke AppKit Fullscreen API. Presentation mode will |
| 2092 // automatically be enabled in |-windowWillEnterFullScreen:|. | 2092 // automatically be enabled in |-windowWillEnterFullScreen:|. |
| 2093 enteringPresentationMode_ = YES; | 2093 enteringPresentationMode_ = YES; |
| 2094 [self enterAppKitFullscreen]; | 2094 [self enterAppKitFullscreen]; |
| 2095 } | 2095 } |
| 2096 } | 2096 } |
| 2097 | 2097 |
| 2098 - (void)enterHTML5FullscreenForURL:(const GURL&)url | 2098 - (void)enterHTML5FullscreenForURL:(const GURL&)url |
| 2099 bubbleType:(FullscreenExitBubbleType)bubbleType { | 2099 bubbleType:(FullscreenExitBubbleType)bubbleType { |
| 2100 const CommandLine* command_line = CommandLine::ForCurrentProcess(); | 2100 if (!chrome::mac::SupportsSystemFullscreen()) { |
| 2101 if (command_line->HasSwitch(switches::kEnableSimplifiedFullscreen) || | |
| 2102 !chrome::mac::SupportsSystemFullscreen()) { | |
| 2103 [self enterImmersiveFullscreen]; | 2101 [self enterImmersiveFullscreen]; |
| 2104 if (!url.is_empty()) | 2102 if (!url.is_empty()) |
| 2105 [self updateFullscreenExitBubbleURL:url bubbleType:bubbleType]; | 2103 [self updateFullscreenExitBubbleURL:url bubbleType:bubbleType]; |
| 2106 } else { | 2104 } else { |
| 2107 [self enterPresentationModeForURL:url bubbleType:bubbleType]; | 2105 [self enterPresentationModeForURL:url bubbleType:bubbleType]; |
| 2108 } | 2106 } |
| 2109 } | 2107 } |
| 2110 | 2108 |
| 2111 - (void)exitAnyFullscreen { | 2109 - (void)exitAnyFullscreen { |
| 2112 // TODO(erikchen): Fullscreen modes should stack. Should be able to exit | 2110 // TODO(erikchen): Fullscreen modes should stack. Should be able to exit |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2198 | 2196 |
| 2199 - (BOOL)supportsBookmarkBar { | 2197 - (BOOL)supportsBookmarkBar { |
| 2200 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR]; | 2198 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR]; |
| 2201 } | 2199 } |
| 2202 | 2200 |
| 2203 - (BOOL)isTabbedWindow { | 2201 - (BOOL)isTabbedWindow { |
| 2204 return browser_->is_type_tabbed(); | 2202 return browser_->is_type_tabbed(); |
| 2205 } | 2203 } |
| 2206 | 2204 |
| 2207 @end // @implementation BrowserWindowController(WindowType) | 2205 @end // @implementation BrowserWindowController(WindowType) |
| OLD | NEW |