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

Unified Diff: chrome/browser/ui/cocoa/browser_window_controller_private.mm

Issue 1526533005: Fix for Flash Content Fullscreen (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed variable names Created 5 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/cocoa/browser_window_controller_private.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/browser_window_controller_private.mm
diff --git a/chrome/browser/ui/cocoa/browser_window_controller_private.mm b/chrome/browser/ui/cocoa/browser_window_controller_private.mm
index b808efe0a3e394be7a3d60e4629b89293dc61121..5676d0a454d5cdb95a8035696a9394e431d2f2cf 100644
--- a/chrome/browser/ui/cocoa/browser_window_controller_private.mm
+++ b/chrome/browser/ui/cocoa/browser_window_controller_private.mm
@@ -455,13 +455,11 @@ willPositionSheet:(NSWindow*)sheet
}
- (void)configurePresentationModeController {
- BOOL fullscreen_for_tab = browser_->exclusive_access_manager()
- ->fullscreen_controller()
- ->IsWindowFullscreenForTabOrPending();
- BOOL kiosk_mode =
+ BOOL fullscreenForTab = [self isFullscreenForTabContent];
+ BOOL kioskMode =
base::CommandLine::ForCurrentProcess()->HasSwitch(switches::kKioskMode);
BOOL showDropdown =
- !fullscreen_for_tab && !kiosk_mode && ([self floatingBarHasFocus]);
+ !fullscreenForTab && !kioskMode && ([self floatingBarHasFocus]);
PermissionBubbleManager* manager = [self permissionBubbleManager];
if (manager && manager->IsBubbleVisible()) {
@@ -717,6 +715,13 @@ willPositionSheet:(NSWindow*)sheet
blockLayoutSubviews_ = NO;
fullscreenTransition_.reset();
+ if ([self isFullscreenForTabContent]) {
+ NSRect windowFrame = [self window].frame;
+ NSRect contentViewFrame =
+ NSMakeRect(0, 0, windowFrame.size.width, windowFrame.size.height);
+ [self.chromeContentView setFrame:contentViewFrame];
+ }
+
// In Yosemite, some combination of the titlebar and toolbar always show in
// full-screen mode. We do not want either to show. Search for the window that
// contains the views, and hide it. There is no need to ever unhide the view.
@@ -857,9 +862,7 @@ willPositionSheet:(NSWindow*)sheet
- (void)adjustUIForEnteringFullscreen {
fullscreen_mac::SlidingStyle style;
- if (browser_->exclusive_access_manager()
- ->fullscreen_controller()
- ->IsWindowFullscreenForTabOrPending()) {
+ if ([self isFullscreenForTabContent]) {
style = fullscreen_mac::OMNIBOX_TABS_NONE;
} else if (enteringPresentationMode_ || [self shouldHideFullscreenToolbar]) {
style = fullscreen_mac::OMNIBOX_TABS_HIDDEN;
@@ -1169,6 +1172,13 @@ willPositionSheet:(NSWindow*)sheet
if (base::mac::IsOSMavericks() && !enterFullScreen)
return NO;
+ // Temporary disable custom enter animation since it currently breaks the
+ // fullscreen Flash content.
+ // TODO(spqchan): Fix the custom animation to enter fullscreen so that it
+ // will work with Flash content.
+ if (enterFullScreen && [self isFullscreenForTabContent])
+ return NO;
+
NSView* root = [[self.window contentView] superview];
if (!root.layer)
return NO;
@@ -1257,4 +1267,10 @@ willPositionSheet:(NSWindow*)sheet
return nil;
}
+- (BOOL)isFullscreenForTabContent {
+ return browser_->exclusive_access_manager()
+ ->fullscreen_controller()
+ ->IsWindowFullscreenForTabOrPending();
+}
+
@end // @implementation BrowserWindowController(Private)
« no previous file with comments | « chrome/browser/ui/cocoa/browser_window_controller_private.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698