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

Unified Diff: chrome/browser/ui/cocoa/tab_contents/tab_contents_controller.mm

Issue 1790663003: Fix for flash fullscreen animations on OSX (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 4 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/cocoa/browser_window_controller_private.mm ('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/tab_contents/tab_contents_controller.mm
diff --git a/chrome/browser/ui/cocoa/tab_contents/tab_contents_controller.mm b/chrome/browser/ui/cocoa/tab_contents/tab_contents_controller.mm
index 70e65894dd245b118e04ae079dca5f88cc248ebd..2d1b79ff0681f21232e49a234b8d64b17fbd0924 100644
--- a/chrome/browser/ui/cocoa/tab_contents/tab_contents_controller.mm
+++ b/chrome/browser/ui/cocoa/tab_contents/tab_contents_controller.mm
@@ -74,6 +74,9 @@ class FullscreenObserver : public WebContentsObserver {
// Computes and returns the frame to use for the contents view within the
// container view.
- (NSRect)frameForContentsView;
+
+// Returns YES if the content view should be resized.
+- (BOOL)shouldResizeContentView;
@end
// An NSView with special-case handling for when the contents view does not
@@ -136,7 +139,7 @@ class FullscreenObserver : public WebContentsObserver {
NSView* const contentsView =
[[self subviews] count] > 0 ? [[self subviews] objectAtIndex:0] : nil;
if (!contentsView || [contentsView autoresizingMask] == NSViewNotSizable ||
- !delegate_) {
+ !delegate_ || ![delegate_ shouldResizeContentView]) {
return;
}
@@ -231,7 +234,8 @@ class FullscreenObserver : public WebContentsObserver {
isEmbeddingFullscreenWidget_ = NO;
contentsNativeView = contents_->GetNativeView();
}
- if (!isEmbeddingFullscreenWidget_ || !blockFullscreenResize_)
+
+ if ([self shouldResizeContentView])
[contentsNativeView setFrame:[self frameForContentsView]];
if ([subviews count] == 0) {
@@ -370,4 +374,8 @@ class FullscreenObserver : public WebContentsObserver {
return NSRectFromCGRect(rect.ToCGRect());
}
+- (BOOL)shouldResizeContentView {
+ return !isEmbeddingFullscreenWidget_ || !blockFullscreenResize_;
+}
+
@end
« no previous file with comments | « chrome/browser/ui/cocoa/browser_window_controller_private.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698