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

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

Issue 6250141: Sidebar mini tabs UI (views version).... Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 10 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
« no previous file with comments | « chrome/browser/ui/cocoa/sidebar_controller.h ('k') | chrome/browser/ui/cocoa/tabs/tab_strip_controller.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/sidebar_controller.mm
===================================================================
--- chrome/browser/ui/cocoa/sidebar_controller.mm (revision 74134)
+++ chrome/browser/ui/cocoa/sidebar_controller.mm (working copy)
@@ -13,6 +13,7 @@
#include "chrome/browser/sidebar/sidebar_manager.h"
#include "chrome/browser/tab_contents/tab_contents.h"
#import "chrome/browser/ui/cocoa/view_id_util.h"
+#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
#include "chrome/common/pref_names.h"
namespace {
@@ -63,15 +64,17 @@
return splitView_.get();
}
-- (void)updateSidebarForTabContents:(TabContents*)contents {
+- (void)updateSidebarForTab:(TabContentsWrapper*)tab {
// Get the active sidebar content.
if (SidebarManager::GetInstance() == NULL) // Happens in tests.
return;
+ TabContents* contents = tab ? tab->tab_contents() : NULL;
+
TabContents* sidebarContents = NULL;
if (contents && SidebarManager::IsSidebarAllowed()) {
SidebarContainer* activeSidebar =
- SidebarManager::GetInstance()->GetActiveSidebarContainerFor(contents);
+ SidebarManager::GetInstance()->GetActiveSidebarContainerFor(tab);
if (activeSidebar)
sidebarContents = activeSidebar->sidebar_contents();
}
@@ -101,9 +104,9 @@
// Native view is a TabContentsViewCocoa object, whose ViewID was
// set to VIEW_ID_TAB_CONTAINER initially, so change it to
- // VIEW_ID_SIDE_BAR_CONTAINER here.
+ // VIEW_ID_SIDEBAR_CONTAINER here.
view_id_util::SetID(
- sidebarContents->GetNativeView(), VIEW_ID_SIDE_BAR_CONTAINER);
+ sidebarContents->GetNativeView(), VIEW_ID_SIDEBAR_CONTAINER);
CGFloat sidebarWidth = 0;
if ([subviews count] == 1) {
« no previous file with comments | « chrome/browser/ui/cocoa/sidebar_controller.h ('k') | chrome/browser/ui/cocoa/tabs/tab_strip_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698