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

Unified Diff: chrome/browser/ui/browser.cc

Issue 11364196: Remove TabContents from TabStripModelObserver::ActiveTabChanged. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/browser.h ('k') | chrome/browser/ui/browser_instant_controller.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/browser.cc
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
index 1f51288ea43ee20795f3f00f14a20958bbb88992..9619b5a792385842796f8e9b271136f1bd9e9adb 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -1068,14 +1068,14 @@ void Browser::TabDeactivated(WebContents* contents) {
window_->GetLocationBar()->SaveStateToContents(contents);
}
-void Browser::ActiveTabChanged(TabContents* old_contents,
- TabContents* new_contents,
+void Browser::ActiveTabChanged(WebContents* old_contents,
+ WebContents* new_contents,
int index,
bool user_gesture) {
// On some platforms we want to automatically reload tabs that are
// killed when the user selects them.
bool did_reload = false;
- if (user_gesture && ShouldReloadCrashedTab(new_contents->web_contents())) {
+ if (user_gesture && ShouldReloadCrashedTab(new_contents)) {
LOG(WARNING) << "Reloading killed tab at " << index;
static int reload_count = 0;
UMA_HISTOGRAM_CUSTOM_COUNTS(
@@ -1104,8 +1104,7 @@ void Browser::ActiveTabChanged(TabContents* old_contents,
UpdateSearchState(new_contents);
// Update reload/stop state.
- command_controller_->LoadingStateChanged(
- new_contents->web_contents()->IsLoading(), true);
+ command_controller_->LoadingStateChanged(new_contents->IsLoading(), true);
// Update commands to reflect current state.
command_controller_->TabStateChanged();
@@ -1122,7 +1121,7 @@ void Browser::ActiveTabChanged(TabContents* old_contents,
}
if (HasFindBarController()) {
- find_bar_controller_->ChangeWebContents(new_contents->web_contents());
+ find_bar_controller_->ChangeWebContents(new_contents);
find_bar_controller_->find_bar()->MoveWindowIfNecessary(gfx::Rect(), true);
}
@@ -1969,9 +1968,9 @@ void Browser::UpdateToolbar(bool should_restore_state) {
should_restore_state);
}
-void Browser::UpdateSearchState(TabContents* contents) {
+void Browser::UpdateSearchState(WebContents* contents) {
if (chrome::search::IsInstantExtendedAPIEnabled(profile_))
- search_delegate_->OnTabActivated(contents->web_contents());
+ search_delegate_->OnTabActivated(contents);
}
void Browser::ScheduleUIUpdate(const WebContents* source,
« no previous file with comments | « chrome/browser/ui/browser.h ('k') | chrome/browser/ui/browser_instant_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698