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

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

Issue 565803004: mac: Use immersive fullscreen for html5 style fullscreen. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments from rsesek. Created 6 years, 3 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
« no previous file with comments | « chrome/browser/ui/cocoa/browser_window_controller.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 if (!chrome::mac::SupportsSystemFullscreen()) { 2100 [self enterImmersiveFullscreen];
2101 [self enterImmersiveFullscreen]; 2101 if (!url.is_empty())
2102 if (!url.is_empty()) 2102 [self updateFullscreenExitBubbleURL:url bubbleType:bubbleType];
2103 [self updateFullscreenExitBubbleURL:url bubbleType:bubbleType];
2104 } else {
2105 [self enterPresentationModeForURL:url bubbleType:bubbleType];
2106 }
2107 } 2103 }
2108 2104
2109 - (void)exitAnyFullscreen { 2105 - (void)exitAnyFullscreen {
2110 // TODO(erikchen): Fullscreen modes should stack. Should be able to exit 2106 // TODO(erikchen): Fullscreen modes should stack. Should be able to exit
2111 // Immersive Fullscreen and still be in AppKit Fullscreen. 2107 // Immersive Fullscreen and still be in AppKit Fullscreen.
2112 if ([self isInAppKitFullscreen]) 2108 if ([self isInAppKitFullscreen])
2113 [self exitAppKitFullscreen]; 2109 [self exitAppKitFullscreen];
2114 if ([self isInImmersiveFullscreen]) 2110 if ([self isInImmersiveFullscreen])
2115 [self exitImmersiveFullscreen]; 2111 [self exitImmersiveFullscreen];
2116 } 2112 }
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
2196 2192
2197 - (BOOL)supportsBookmarkBar { 2193 - (BOOL)supportsBookmarkBar {
2198 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR]; 2194 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR];
2199 } 2195 }
2200 2196
2201 - (BOOL)isTabbedWindow { 2197 - (BOOL)isTabbedWindow {
2202 return browser_->is_type_tabbed(); 2198 return browser_->is_type_tabbed();
2203 } 2199 }
2204 2200
2205 @end // @implementation BrowserWindowController(WindowType) 2201 @end // @implementation BrowserWindowController(WindowType)
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/browser_window_controller.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698