Index: chrome/browser/tab_contents/tab_contents_view.cc |
diff --git a/chrome/browser/tab_contents/tab_contents_view.cc b/chrome/browser/tab_contents/tab_contents_view.cc |
index 47e71f2706af0ea586e542f3d912b7318775c200..25264f04b102904cecddd0904dd06e85c2bb7a61 100644 |
--- a/chrome/browser/tab_contents/tab_contents_view.cc |
+++ b/chrome/browser/tab_contents/tab_contents_view.cc |
@@ -11,6 +11,8 @@ |
#include "chrome/browser/renderer_host/render_widget_host_view.h" |
#include "chrome/browser/tab_contents/tab_contents.h" |
#include "chrome/browser/tab_contents/tab_contents_delegate.h" |
+#include "chrome/common/notification_service.h" |
+#include "chrome/common/render_messages_params.h" |
TabContentsView::TabContentsView(TabContents* tab_contents) |
: tab_contents_(tab_contents) { |
@@ -30,8 +32,7 @@ void TabContentsView::RenderViewCreated(RenderViewHost* host) { |
void TabContentsView::CreateNewWindow( |
int route_id, |
- WindowContainerType window_container_type, |
- const string16& frame_name) { |
+ const ViewHostMsg_CreateWindow_Params& params) { |
TabContents* new_contents = delegate_view_helper_.CreateNewWindow( |
route_id, |
tab_contents_->profile(), |
@@ -39,11 +40,18 @@ void TabContentsView::CreateNewWindow( |
DOMUIFactory::GetDOMUIType(tab_contents_->profile(), |
tab_contents_->GetURL()), |
tab_contents_, |
- window_container_type, |
- frame_name); |
+ params.window_container_type, |
+ params.frame_name); |
- if (new_contents && tab_contents_->delegate()) |
- tab_contents_->delegate()->TabContentsCreated(new_contents); |
+ if (new_contents) { |
+ NotificationService::current()->Notify( |
+ NotificationType::CREATING_NEW_WINDOW, |
+ Source<TabContents>(tab_contents_), |
+ Details<const ViewHostMsg_CreateWindow_Params>(¶ms)); |
+ |
+ if (tab_contents_->delegate()) |
+ tab_contents_->delegate()->TabContentsCreated(new_contents); |
+ } |
} |
void TabContentsView::CreateNewWidget(int route_id, |