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

Unified Diff: chrome/browser/ui/cocoa/browser_window_controller.mm

Issue 9006027: Rip Out the Sidebar API (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 8 years, 11 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
Index: chrome/browser/ui/cocoa/browser_window_controller.mm
===================================================================
--- chrome/browser/ui/cocoa/browser_window_controller.mm (revision 116830)
+++ 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"
@@ -285,27 +284,19 @@
[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]
+ setFrame:[[devToolsController_ view] bounds]];
+ [[devToolsController_ view]
addSubview:[previewableContentsController_ view]];
// Create a controller for the tab strip, giving it the model object for
@@ -536,11 +527,6 @@
withProfile:browser_->profile()];
}
-- (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
@@ -1525,13 +1511,11 @@
// Update all the UI bits.
windowShim_->UpdateTitleBar();
- [sidebarController_ updateSidebarForTabContents:
- static_cast<TabContents*>(contents)];
[devToolsController_ updateDevToolsForWebContents:contents
withProfile:browser_->profile()];
// Update the bookmark bar.
- // Must do it after sidebar and devtools update, otherwise bookmark bar might
+ // Must do it after devtools updates, otherwise bookmark bar might
// call resizeView -> layoutSubviews and cause unnecessary relayout.
// TODO(viettrungluu): perhaps update to not terminate running animations (if
// applicable)?
@@ -1542,8 +1526,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];
}
« no previous file with comments | « chrome/browser/ui/cocoa/browser_window_controller.h ('k') | chrome/browser/ui/cocoa/browser_window_controller_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698