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

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

Issue 8404046: When creating a tab contents for a browser in the RVHDelegateHelper, create a wrapper immediately. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updates Created 9 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/browser.cc
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
index 50450606f26c6f0484168043fb622d40f81a9cc1..c6d25a52f6c84e5dc81f60b61d4f74013d5314d6 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -3851,6 +3851,15 @@ bool Browser::ShouldAddNavigationToHistory(
return !IsApplication();
}
+void Browser::TabContentsCreated(TabContents* new_contents) {
+ // Create a TabContentsWrapper now, so all observers are in place, as the
+ // network requests for its initial navigation will start immediately. The
+ // TabContents will later be inserted into this browser using
+ // Browser::Navigate via AddNewContents. The latter will retrieve the newly
+ // created TabContentsWrapper from TabContents object.
+ new TabContentsWrapper(new_contents);
+}
+
void Browser::ContentRestrictionsChanged(TabContents* source) {
UpdateCommandsForContentRestrictionState();
}

Powered by Google App Engine
This is Rietveld 408576698