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

Side by Side Diff: chrome/browser/ui/cocoa/browser_window_cocoa.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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/cocoa/browser_window_cocoa.h" 5 #include "chrome/browser/ui/cocoa/browser_window_cocoa.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/sys_string_conversions.h" 10 #include "base/sys_string_conversions.h"
(...skipping 595 matching lines...) Expand 10 before | Expand all | Expand 10 after
606 void BrowserWindowCocoa::Observe(NotificationType type, 606 void BrowserWindowCocoa::Observe(NotificationType type,
607 const NotificationSource& source, 607 const NotificationSource& source,
608 const NotificationDetails& details) { 608 const NotificationDetails& details) {
609 switch (type.value) { 609 switch (type.value) {
610 // Only the key window gets a direct toggle from the menu. 610 // Only the key window gets a direct toggle from the menu.
611 // Other windows hear about it from the notification. 611 // Other windows hear about it from the notification.
612 case NotificationType::BOOKMARK_BAR_VISIBILITY_PREF_CHANGED: 612 case NotificationType::BOOKMARK_BAR_VISIBILITY_PREF_CHANGED:
613 [controller_ updateBookmarkBarVisibilityWithAnimation:YES]; 613 [controller_ updateBookmarkBarVisibilityWithAnimation:YES];
614 break; 614 break;
615 case NotificationType::SIDEBAR_CHANGED: 615 case NotificationType::SIDEBAR_CHANGED:
616 UpdateSidebarForContents( 616 UpdateSidebar(Details<SidebarChangedDetails>(details).ptr());
617 Details<SidebarContainer>(details)->tab_contents());
618 break; 617 break;
619 default: 618 default:
620 NOTREACHED(); // we don't ask for anything else! 619 NOTREACHED(); // we don't ask for anything else!
621 break; 620 break;
622 } 621 }
623 } 622 }
624 623
625 void BrowserWindowCocoa::DestroyBrowser() { 624 void BrowserWindowCocoa::DestroyBrowser() {
626 [controller_ destroyBrowser]; 625 [controller_ destroyBrowser];
627 626
628 // at this point the controller is dead (autoreleased), so 627 // at this point the controller is dead (autoreleased), so
629 // make sure we don't try to reference it any more. 628 // make sure we don't try to reference it any more.
630 } 629 }
631 630
632 NSWindow* BrowserWindowCocoa::window() const { 631 NSWindow* BrowserWindowCocoa::window() const {
633 return [controller_ window]; 632 return [controller_ window];
634 } 633 }
635 634
636 void BrowserWindowCocoa::UpdateSidebarForContents(TabContents* tab_contents) { 635 void BrowserWindowCocoa::UpdateSidebar(SidebarChangedDetails* details) {
637 if (tab_contents == browser_->GetSelectedTabContents()) { 636 if (details->source->tab() == browser_->GetSelectedTabContentsWrapper()) {
638 [controller_ updateSidebarForContents:tab_contents]; 637 [controller_ updateSidebarForTab:details->source->tab()];
639 } 638 }
640 } 639 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/browser_window_cocoa.h ('k') | chrome/browser/ui/cocoa/browser_window_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698