summaryrefslogtreecommitdiffstats
path: root/chrome/browser/tab_contents/interstitial_page.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/tab_contents/interstitial_page.cc')
-rw-r--r--chrome/browser/tab_contents/interstitial_page.cc19
1 files changed, 10 insertions, 9 deletions
diff --git a/chrome/browser/tab_contents/interstitial_page.cc b/chrome/browser/tab_contents/interstitial_page.cc
index 942c126..c7e7d49 100644
--- a/chrome/browser/tab_contents/interstitial_page.cc
+++ b/chrome/browser/tab_contents/interstitial_page.cc
@@ -13,6 +13,7 @@
#include "chrome/browser/tab_contents/navigation_entry.h"
#include "chrome/browser/tab_contents/web_contents.h"
#include "chrome/browser/tab_contents/web_contents_view_win.h"
+#include "chrome/common/notification_service.h"
#include "chrome/views/window.h"
#include "chrome/views/window_delegate.h"
#include "net/base/escape.h"
@@ -106,7 +107,7 @@ void InterstitialPage::Show() {
// NOTIFY_TAB_CONTENTS_DESTROYED as at that point the RenderViewHost has
// already been destroyed.
notification_registrar_.Add(
- this, NOTIFY_RENDER_WIDGET_HOST_DESTROYED,
+ this, NotificationType::RENDER_WIDGET_HOST_DESTROYED,
Source<RenderWidgetHost>(tab_->render_view_host()));
// Update the tab_to_interstitial_page_ map.
@@ -134,11 +135,11 @@ void InterstitialPage::Show() {
EscapePath(GetHTMLContents());
render_view_host_->NavigateToURL(GURL(data_url));
- notification_registrar_.Add(this, NOTIFY_TAB_CONTENTS_DESTROYED,
+ notification_registrar_.Add(this, NotificationType::TAB_CONTENTS_DESTROYED,
Source<TabContents>(tab_));
- notification_registrar_.Add(this, NOTIFY_NAV_ENTRY_COMMITTED,
+ notification_registrar_.Add(this, NotificationType::NAV_ENTRY_COMMITTED,
Source<NavigationController>(tab_->controller()));
- notification_registrar_.Add(this, NOTIFY_NAV_ENTRY_PENDING,
+ notification_registrar_.Add(this, NotificationType::NAV_ENTRY_PENDING,
Source<NavigationController>(tab_->controller()));
}
@@ -159,8 +160,8 @@ void InterstitialPage::Hide() {
void InterstitialPage::Observe(NotificationType type,
const NotificationSource& source,
const NotificationDetails& details) {
- switch (type) {
- case NOTIFY_NAV_ENTRY_PENDING:
+ switch (type.value) {
+ case NotificationType::NAV_ENTRY_PENDING:
// We are navigating away from the interstitial (the user has typed a URL
// in the location bar or clicked a bookmark). Make sure clicking on the
// interstitial will have no effect. Also cancel any blocked requests
@@ -174,7 +175,7 @@ void InterstitialPage::Observe(NotificationType type,
DCHECK(!resource_dispatcher_host_notified_);
TakeActionOnResourceDispatcher(CANCEL);
break;
- case NOTIFY_RENDER_WIDGET_HOST_DESTROYED:
+ case NotificationType::RENDER_WIDGET_HOST_DESTROYED:
if (!action_taken_) {
// The RenderViewHost is being destroyed (as part of the tab being
// closed), make sure we clear the blocked requests.
@@ -184,8 +185,8 @@ void InterstitialPage::Observe(NotificationType type,
TakeActionOnResourceDispatcher(CANCEL);
}
break;
- case NOTIFY_TAB_CONTENTS_DESTROYED:
- case NOTIFY_NAV_ENTRY_COMMITTED:
+ case NotificationType::TAB_CONTENTS_DESTROYED:
+ case NotificationType::NAV_ENTRY_COMMITTED:
if (!action_taken_) {
// We are navigating away from the interstitial or closing a tab with an
// interstitial. Default to DontProceed(). We don't just call Hide as