| 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 08c4324e78d06e5ab0b102311cdad54fa9967e91..0c4c4f1b533024c458415ca102c913584e5ed4a0 100644
|
| --- a/chrome/browser/ui/cocoa/tab_contents/tab_contents_controller.mm
|
| +++ b/chrome/browser/ui/cocoa/tab_contents/tab_contents_controller.mm
|
| @@ -77,6 +77,10 @@ class FullscreenObserver : public WebContentsObserver {
|
|
|
| // Returns YES if the content view should be resized.
|
| - (BOOL)shouldResizeContentView;
|
| +
|
| +// Returns YES if the content view is inside a popup.
|
| +- (BOOL)isPopup;
|
| +
|
| @end
|
|
|
| // An NSView with special-case handling for when the contents view does not
|
| @@ -112,11 +116,16 @@ class FullscreenObserver : public WebContentsObserver {
|
|
|
| // Override auto-resizing logic to query the delegate for the exact frame to
|
| // use for the contents view.
|
| +// TODO(spqchan): The popup check is a temporary solution to fix the regression
|
| +// issue described in crbug.com/604288. This method doesn't really affect
|
| +// fullscreen if the content is inside a normal browser window, but would
|
| +// cause a flash fullscreen widget to blow up if it's inside a popup.
|
| - (void)resizeSubviewsWithOldSize:(NSSize)oldBoundsSize {
|
| NSView* const contentsView =
|
| [[self subviews] count] > 0 ? [[self subviews] objectAtIndex:0] : nil;
|
| if (!contentsView || [contentsView autoresizingMask] == NSViewNotSizable ||
|
| - !delegate_ || ![delegate_ shouldResizeContentView]) {
|
| + !delegate_ ||
|
| + (![delegate_ shouldResizeContentView] && [delegate_ isPopup])) {
|
| return;
|
| }
|
|
|
| @@ -184,10 +193,11 @@ class FullscreenObserver : public WebContentsObserver {
|
| @synthesize webContents = contents_;
|
| @synthesize blockFullscreenResize = blockFullscreenResize_;
|
|
|
| -- (id)initWithContents:(WebContents*)contents {
|
| +- (id)initWithContents:(WebContents*)contents isPopup:(BOOL)popup {
|
| if ((self = [super initWithNibName:nil bundle:nil])) {
|
| fullscreenObserver_.reset(new FullscreenObserver(self));
|
| [self changeWebContents:contents];
|
| + isPopup_ = popup;
|
| }
|
| return self;
|
| }
|
| @@ -387,4 +397,8 @@ class FullscreenObserver : public WebContentsObserver {
|
| return !isEmbeddingFullscreenWidget_ || !blockFullscreenResize_;
|
| }
|
|
|
| +- (BOOL)isPopup {
|
| + return isPopup_;
|
| +}
|
| +
|
| @end
|
|
|