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

Unified Diff: chrome/browser/tab_contents/render_view_host_delegate_helper.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/tab_contents/render_view_host_delegate_helper.cc
diff --git a/chrome/browser/tab_contents/render_view_host_delegate_helper.cc b/chrome/browser/tab_contents/render_view_host_delegate_helper.cc
index d2e9bce2e78fc0084e56644320aaa52359b8417a..9533c760e27bc81cefb96e80e0cae05aa1eb2364 100644
--- a/chrome/browser/tab_contents/render_view_host_delegate_helper.cc
+++ b/chrome/browser/tab_contents/render_view_host_delegate_helper.cc
@@ -263,6 +263,9 @@ TabContents* RenderViewHostDelegateViewHelper::CreateNewWindowFromTabContents(
params.frame_name);
if (new_contents) {
+ if (tab_contents->delegate())
+ tab_contents->delegate()->TabContentsCreated(new_contents);
+
content::RetargetingDetails details;
details.source_tab_contents = tab_contents;
details.source_frame_id = params.opener_frame_id;
@@ -273,9 +276,6 @@ TabContents* RenderViewHostDelegateViewHelper::CreateNewWindowFromTabContents(
content::Source<content::BrowserContext>(
tab_contents->browser_context()),
content::Details<content::RetargetingDetails>(&details));
-
- if (tab_contents->delegate())
- tab_contents->delegate()->TabContentsCreated(new_contents);
} else {
content::NotificationService::current()->Notify(
content::NOTIFICATION_CREATING_NEW_WINDOW_CANCELLED,

Powered by Google App Engine
This is Rietveld 408576698