summaryrefslogtreecommitdiffstats
path: root/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm')
-rw-r--r--chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm12
1 files changed, 10 insertions, 2 deletions
diff --git a/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm b/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm
index be3e0b7..8c57621 100644
--- a/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm
+++ b/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm
@@ -1296,8 +1296,12 @@ NSImage* Overlay(NSImage* ground, NSImage* overlay, CGFloat alpha) {
// Make a new tab. Load the contents of this tab from the nib and associate
// the new controller with |contents| so it can be looked up later.
+ const BOOL autoEmbedFullscreen =
+ implicit_cast<content::WebContentsDelegate*>(browser_)->
+ EmbedsFullscreenWidget();
base::scoped_nsobject<TabContentsController> contentsController(
- [[TabContentsController alloc] initWithContents:contents]);
+ [[TabContentsController alloc] initWithContents:contents
+ andAutoEmbedFullscreen:autoEmbedFullscreen]);
[tabContentsArray_ insertObject:contentsController atIndex:index];
// Make a new tab and add it to the strip. Keep track of its controller.
@@ -1410,8 +1414,12 @@ NSImage* Overlay(NSImage* ground, NSImage* overlay, CGFloat alpha) {
// Simply create a new TabContentsController for |newContents| and place it
// into the array, replacing |oldContents|. An ActiveTabChanged notification
// will follow, at which point we will install the new view.
+ const BOOL autoEmbedFullscreen =
+ implicit_cast<content::WebContentsDelegate*>(browser_)->
+ EmbedsFullscreenWidget();
base::scoped_nsobject<TabContentsController> newController(
- [[TabContentsController alloc] initWithContents:newContents]);
+ [[TabContentsController alloc] initWithContents:newContents
+ andAutoEmbedFullscreen:autoEmbedFullscreen]);
// Bye bye, |oldController|.
[tabContentsArray_ replaceObjectAtIndex:index withObject:newController];