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

Side by Side Diff: chrome/browser/browser.cc

Issue 155441: Nukes the 3 arg TabMoved variant in favor of the 4 arg variant.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 5 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
« no previous file with comments | « chrome/browser/browser.h ('k') | chrome/browser/cocoa/tab_strip_model_observer_bridge.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-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 #include "chrome/browser/browser.h" 5 #include "chrome/browser/browser.h"
6 6
7 #include "app/animation.h" 7 #include "app/animation.h"
8 #include "app/l10n_util.h" 8 #include "app/l10n_util.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/idle_timer.h" 10 #include "base/idle_timer.h"
(...skipping 1653 matching lines...) Expand 10 before | Expand all | Expand 10 after
1664 SessionService* session_service = profile_->GetSessionService(); 1664 SessionService* session_service = profile_->GetSessionService();
1665 if (session_service && !tabstrip_model_.closing_all()) { 1665 if (session_service && !tabstrip_model_.closing_all()) {
1666 session_service->SetSelectedTabInWindow( 1666 session_service->SetSelectedTabInWindow(
1667 session_id(), tabstrip_model_.selected_index()); 1667 session_id(), tabstrip_model_.selected_index());
1668 } 1668 }
1669 } 1669 }
1670 } 1670 }
1671 1671
1672 void Browser::TabMoved(TabContents* contents, 1672 void Browser::TabMoved(TabContents* contents,
1673 int from_index, 1673 int from_index,
1674 int to_index) { 1674 int to_index,
1675 bool pinned_state_changed) {
1675 DCHECK(from_index >= 0 && to_index >= 0); 1676 DCHECK(from_index >= 0 && to_index >= 0);
1676 // Notify the history service. 1677 // Notify the history service.
1677 SyncHistoryWithTabs(std::min(from_index, to_index)); 1678 SyncHistoryWithTabs(std::min(from_index, to_index));
1678 } 1679 }
1679 1680
1680 void Browser::TabStripEmpty() { 1681 void Browser::TabStripEmpty() {
1681 // Close the frame after we return to the message loop (not immediately, 1682 // Close the frame after we return to the message loop (not immediately,
1682 // otherwise it will destroy this object before the stack has a chance to 1683 // otherwise it will destroy this object before the stack has a chance to
1683 // cleanly unwind.) 1684 // cleanly unwind.)
1684 // Note: This will be called several times if TabStripEmpty is called several 1685 // Note: This will be called several times if TabStripEmpty is called several
(...skipping 1057 matching lines...) Expand 10 before | Expand all | Expand 10 after
2742 /////////////////////////////////////////////////////////////////////////////// 2743 ///////////////////////////////////////////////////////////////////////////////
2743 // BrowserToolbarModel (private): 2744 // BrowserToolbarModel (private):
2744 2745
2745 NavigationController* Browser::BrowserToolbarModel::GetNavigationController() { 2746 NavigationController* Browser::BrowserToolbarModel::GetNavigationController() {
2746 // This |current_tab| can be NULL during the initialization of the 2747 // This |current_tab| can be NULL during the initialization of the
2747 // toolbar during window creation (i.e. before any tabs have been added 2748 // toolbar during window creation (i.e. before any tabs have been added
2748 // to the window). 2749 // to the window).
2749 TabContents* current_tab = browser_->GetSelectedTabContents(); 2750 TabContents* current_tab = browser_->GetSelectedTabContents();
2750 return current_tab ? &current_tab->controller() : NULL; 2751 return current_tab ? &current_tab->controller() : NULL;
2751 } 2752 }
OLDNEW
« no previous file with comments | « chrome/browser/browser.h ('k') | chrome/browser/cocoa/tab_strip_model_observer_bridge.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698