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

Side by Side Diff: chrome/browser/cocoa/tab_strip_controller.mm

Issue 348015: Fix and re-enable a test I broke with the find bar changes I made last night.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 1 month 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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 #import "chrome/browser/cocoa/tab_strip_controller.h" 5 #import "chrome/browser/cocoa/tab_strip_controller.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "app/l10n_util.h" 9 #include "app/l10n_util.h"
10 #include "app/resource_bundle.h" 10 #include "app/resource_bundle.h"
(...skipping 631 matching lines...) Expand 10 before | Expand all | Expand 10 after
642 } 642 }
643 643
644 // Swap in the contents for the new tab 644 // Swap in the contents for the new tab
645 [self swapInTabAtIndex:index]; 645 [self swapInTabAtIndex:index];
646 646
647 if (newContents) { 647 if (newContents) {
648 newContents->DidBecomeSelected(); 648 newContents->DidBecomeSelected();
649 newContents->view()->RestoreFocus(); 649 newContents->view()->RestoreFocus();
650 650
651 if (newContents->find_ui_active()) 651 if (newContents->find_ui_active())
652 browser_->find_bar()->find_bar()->SetFocusAndSelection(); 652 browser_->GetFindBarController()->find_bar()->SetFocusAndSelection();
653 } 653 }
654 } 654 }
655 655
656 // Called when a notification is received from the model that the given tab 656 // Called when a notification is received from the model that the given tab
657 // has gone away. Remove all knowledge about this tab and it's associated 657 // has gone away. Remove all knowledge about this tab and it's associated
658 // controller and remove the view from the strip. 658 // controller and remove the view from the strip.
659 - (void)tabDetachedWithContents:(TabContents*)contents 659 - (void)tabDetachedWithContents:(TabContents*)contents
660 atIndex:(NSInteger)index { 660 atIndex:(NSInteger)index {
661 // Release the tab contents controller so those views get destroyed. This 661 // Release the tab contents controller so those views get destroyed. This
662 // will remove all the tab content Cocoa views from the hierarchy. A 662 // will remove all the tab content Cocoa views from the hierarchy. A
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after
1023 BrowserWindowController* controller = 1023 BrowserWindowController* controller =
1024 (BrowserWindowController*)[[switchView_ window] windowController]; 1024 (BrowserWindowController*)[[switchView_ window] windowController];
1025 DCHECK(index >= 0); 1025 DCHECK(index >= 0);
1026 if (index >= 0) { 1026 if (index >= 0) {
1027 [controller setTab:[self viewAtIndex:index] isDraggable:YES]; 1027 [controller setTab:[self viewAtIndex:index] isDraggable:YES];
1028 } 1028 }
1029 } 1029 }
1030 1030
1031 1031
1032 @end 1032 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698