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

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

Issue 11359201: Remove TabContents from TabStripModelObserver::TabReplacedAt. (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_command_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 3e3fd4781e5f16feded4f466e5b376271ef41a98..06e96c6930cee50f098217a38f31cc92e99dd423 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -1153,23 +1153,21 @@ void Browser::TabMoved(WebContents* contents,
}
void Browser::TabReplacedAt(TabStripModel* tab_strip_model,
- TabContents* old_contents,
- TabContents* new_contents,
+ WebContents* old_contents,
+ WebContents* new_contents,
int index) {
- TabDetachedAtImpl(old_contents->web_contents(), index, DETACH_TYPE_REPLACE);
+ TabDetachedAtImpl(old_contents, index, DETACH_TYPE_REPLACE);
SessionService* session_service =
SessionServiceFactory::GetForProfile(profile_);
if (session_service)
- session_service->TabClosing(old_contents->web_contents());
- TabInsertedAt(new_contents->web_contents(), index, (index == active_index()));
+ session_service->TabClosing(old_contents);
+ TabInsertedAt(new_contents, index, (index == active_index()));
- int entry_count =
- new_contents->web_contents()->GetController().GetEntryCount();
+ int entry_count = new_contents->GetController().GetEntryCount();
if (entry_count > 0) {
// Send out notification so that observers are updated appropriately.
- new_contents->web_contents()->GetController().NotifyEntryChanged(
- new_contents->web_contents()->GetController().GetEntryAtIndex(
- entry_count - 1),
+ new_contents->GetController().NotifyEntryChanged(
+ new_contents->GetController().GetEntryAtIndex(entry_count - 1),
entry_count - 1);
}
@@ -1181,7 +1179,7 @@ void Browser::TabReplacedAt(TabStripModel* tab_strip_model,
}
content::DevToolsManager::GetInstance()->ContentsReplaced(
- old_contents->web_contents(), new_contents->web_contents());
+ old_contents, new_contents);
}
void Browser::TabPinnedStateChanged(WebContents* contents, int index) {
« no previous file with comments | « chrome/browser/ui/browser.h ('k') | chrome/browser/ui/browser_command_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698