summaryrefslogtreecommitdiffstats
path: root/content
diff options
context:
space:
mode:
Diffstat (limited to 'content')
-rw-r--r--content/browser/tab_contents/tab_contents_view.cc5
-rw-r--r--content/common/notification_type.h6
2 files changed, 11 insertions, 0 deletions
diff --git a/content/browser/tab_contents/tab_contents_view.cc b/content/browser/tab_contents/tab_contents_view.cc
index 79ee406..4ea5d9b 100644
--- a/content/browser/tab_contents/tab_contents_view.cc
+++ b/content/browser/tab_contents/tab_contents_view.cc
@@ -50,6 +50,11 @@ void TabContentsView::CreateNewWindow(
if (tab_contents_->delegate())
tab_contents_->delegate()->TabContentsCreated(new_contents);
+ } else {
+ NotificationService::current()->Notify(
+ NotificationType::CREATING_NEW_WINDOW_CANCELLED,
+ Source<TabContents>(tab_contents_),
+ Details<const ViewHostMsg_CreateWindow_Params>(&params));
}
}
diff --git a/content/common/notification_type.h b/content/common/notification_type.h
index c7e4d6a..7f57c50 100644
--- a/content/common/notification_type.h
+++ b/content/common/notification_type.h
@@ -131,6 +131,12 @@ class NotificationType {
// ViewHostMsg_CreateWindow_Params object are provided.
CREATING_NEW_WINDOW,
+ // A new window was requested but was not created. The source will be a
+ // Source<TabContents> corresponding to the tab the request originated from.
+ // Details are the ViewHostMsg_CreateWindow_Params object that were used in
+ // the request.
+ CREATING_NEW_WINDOW_CANCELLED,
+
// SSL ---------------------------------------------------------------------
// Updating the SSL security indicators (the lock icon and such) proceeds