| Index: chrome/browser/ui/cocoa/browser_window_controller.mm
|
| diff --git a/chrome/browser/ui/cocoa/browser_window_controller.mm b/chrome/browser/ui/cocoa/browser_window_controller.mm
|
| index e2ad14dbac760a4a18cd17784b24527f7dd84b37..11a8e4f1fb74528e7e68a2cf7fd08257cb42c489 100644
|
| --- a/chrome/browser/ui/cocoa/browser_window_controller.mm
|
| +++ b/chrome/browser/ui/cocoa/browser_window_controller.mm
|
| @@ -61,6 +61,7 @@
|
| #import "chrome/browser/ui/cocoa/profiles/avatar_base_controller.h"
|
| #import "chrome/browser/ui/cocoa/profiles/avatar_button_controller.h"
|
| #import "chrome/browser/ui/cocoa/profiles/avatar_icon_controller.h"
|
| +#import "chrome/browser/ui/cocoa/sidebar_controller.h"
|
| #import "chrome/browser/ui/cocoa/status_bubble_mac.h"
|
| #import "chrome/browser/ui/cocoa/tab_contents/overlayable_contents_controller.h"
|
| #import "chrome/browser/ui/cocoa/tab_contents/sad_tab_controller.h"
|
| @@ -309,6 +310,12 @@ using content::WebContents;
|
| [[devToolsController_ view]
|
| addSubview:[overlayableContentsController_ view]];
|
|
|
| + // Create a sub-controller for the docked sidebar and add its view to the
|
| + // hierarchy.
|
| + sidebarController_.reset([[SidebarController alloc]
|
| + initWithParentViewController:devToolsController_
|
| + andContentsController:overlayableContentsController_]);
|
| +
|
| // Create a controller for the tab strip, giving it the model object for
|
| // this window's Browser and the tab strip view. The controller will handle
|
| // registering for the appropriate tab notifications from the back-end and
|
| @@ -541,6 +548,12 @@ using content::WebContents;
|
| [self layoutSubviews];
|
| }
|
|
|
| +- (void)updateSidebarForContents:(content::WebContents*)contents {
|
| + [sidebarController_ updateSidebarForTabContents:contents
|
| + withContext:browser_->profile()];
|
| + [sidebarController_ ensureContentsVisible];
|
| +}
|
| +
|
| // Called when the user wants to close a window or from the shutdown process.
|
| // The Browser object is in control of whether or not we're allowed to close. It
|
| // may defer closing due to several states, such as onUnload handlers needing to
|
| @@ -1661,6 +1674,9 @@ using content::WebContents;
|
| // Update all the UI bits.
|
| windowShim_->UpdateTitleBar();
|
|
|
| + [sidebarController_
|
| + updateSidebarForTabContents:static_cast<content::WebContents*>(contents)
|
| + withContext:browser_->profile()];
|
| // Update the bookmark bar.
|
| // TODO(viettrungluu): perhaps update to not terminate running animations (if
|
| // applicable)?
|
| @@ -1669,6 +1685,9 @@ using content::WebContents;
|
|
|
| [infoBarContainerController_ changeWebContents:contents];
|
|
|
| + // Update devTools and sidebar contents after size for all views is set.
|
| + [sidebarController_ ensureContentsVisible];
|
| +
|
| // Must do this after bookmark and infobar updates to avoid
|
| // unnecesary resize in contents.
|
| [devToolsController_ updateDevToolsForWebContents:contents
|
|
|