| Index: chrome/browser/ui/cocoa/browser_window_controller.mm
|
| ===================================================================
|
| --- chrome/browser/ui/cocoa/browser_window_controller.mm (revision 115368)
|
| +++ chrome/browser/ui/cocoa/browser_window_controller.mm (working copy)
|
| @@ -47,7 +47,6 @@
|
| #import "chrome/browser/ui/cocoa/infobars/infobar_container_controller.h"
|
| #import "chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_editor.h"
|
| #import "chrome/browser/ui/cocoa/presentation_mode_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/previewable_contents_controller.h"
|
| #import "chrome/browser/ui/cocoa/tab_contents/sad_tab_controller.h"
|
| @@ -281,28 +280,16 @@
|
| [self installAvatar];
|
|
|
| // Create a sub-controller for the docked devTools and add its view to the
|
| - // hierarchy. This must happen before the sidebar controller is
|
| - // instantiated.
|
| + // hierarchy.
|
| devToolsController_.reset(
|
| [[DevToolsController alloc] initWithDelegate:self]);
|
| [[devToolsController_ view] setFrame:[[self tabContentArea] bounds]];
|
| [[self tabContentArea] addSubview:[devToolsController_ view]];
|
|
|
| - // Create a sub-controller for the docked sidebar and add its view to the
|
| - // hierarchy. This must happen before the previewable contents controller
|
| - // is instantiated.
|
| - sidebarController_.reset([[SidebarController alloc] initWithDelegate:self]);
|
| - [[sidebarController_ view] setFrame:[[devToolsController_ view] bounds]];
|
| - [[devToolsController_ view] addSubview:[sidebarController_ view]];
|
| -
|
| // Create the previewable contents controller. This provides the switch
|
| // view that TabStripController needs.
|
| previewableContentsController_.reset(
|
| [[PreviewableContentsController alloc] init]);
|
| - [[previewableContentsController_ view]
|
| - setFrame:[[sidebarController_ view] bounds]];
|
| - [[sidebarController_ view]
|
| - addSubview:[previewableContentsController_ view]];
|
|
|
| // 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
|
| @@ -527,11 +514,6 @@
|
| [devToolsController_ ensureContentsVisible];
|
| }
|
|
|
| -- (void)updateSidebarForContents:(TabContents*)contents {
|
| - [sidebarController_ updateSidebarForTabContents:contents];
|
| - [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
|
| @@ -1516,13 +1498,12 @@
|
| // Update all the UI bits.
|
| windowShim_->UpdateTitleBar();
|
|
|
| - [sidebarController_ updateSidebarForTabContents:contents];
|
| [devToolsController_ updateDevToolsForTabContents:contents
|
| withProfile:browser_->profile()];
|
|
|
| // Update the bookmark bar.
|
| - // Must do it after sidebar and devtools update, otherwise bookmark bar might
|
| - // call resizeView -> layoutSubviews and cause unnecessary relayout.
|
| + // Must do it after devtools update, otherwise bookmark bar might call
|
| + // resizeView -> layoutSubviews and cause unnecessary relayout.
|
| // TODO(viettrungluu): perhaps update to not terminate running animations (if
|
| // applicable)?
|
| [self updateBookmarkBarVisibilityWithAnimation:NO];
|
| @@ -1532,8 +1513,7 @@
|
| // Without the .get(), xcode fails.
|
| [infoBarContainerController_.get() changeTabContents:wrapper];
|
|
|
| - // Update devTools and sidebar contents after size for all views is set.
|
| - [sidebarController_ ensureContentsVisible];
|
| + // Update devTools contents after size for all views is set.
|
| [devToolsController_ ensureContentsVisible];
|
| }
|
|
|
|
|