diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-01 18:16:56 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-01 18:16:56 +0000 |
commit | bfd04a62ce610d7bb61dbb78811dccbed23589b7 (patch) | |
tree | 70bb228c0f00ba1c12c584efd569daccf96b4026 /chrome/browser/modal_html_dialog_delegate.cc | |
parent | a814d863440f0a154a7299f2d8b440f405c7700e (diff) | |
download | chromium_src-bfd04a62ce610d7bb61dbb78811dccbed23589b7.zip chromium_src-bfd04a62ce610d7bb61dbb78811dccbed23589b7.tar.gz chromium_src-bfd04a62ce610d7bb61dbb78811dccbed23589b7.tar.bz2 |
Remove most header file dependencies on the notification type list. It is
really painful to add more types, since lots of headers include the
notification service to derive from the notification observer. This splits that
out, so much less of the project should end up including notification_types.h
---Paths modified but not in any changelist:
Review URL: http://codereview.chromium.org/19744
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9020 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/modal_html_dialog_delegate.cc')
-rw-r--r-- | chrome/browser/modal_html_dialog_delegate.cc | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/chrome/browser/modal_html_dialog_delegate.cc b/chrome/browser/modal_html_dialog_delegate.cc index 4afdd47..fa8549c 100644 --- a/chrome/browser/modal_html_dialog_delegate.cc +++ b/chrome/browser/modal_html_dialog_delegate.cc @@ -6,15 +6,16 @@ #include "chrome/browser/browser_list.h" #include "chrome/browser/renderer_host/render_view_host.h" +#include "chrome/common/notification_service.h" ModalHtmlDialogDelegate::ModalHtmlDialogDelegate( const GURL& url, int width, int height, const std::string& json_arguments, IPC::Message* sync_result, WebContents* contents) - : contents_(contents), - sync_response_(sync_result) { + : contents_(contents), + sync_response_(sync_result) { // Listen for when the WebContents or its renderer dies. NotificationService::current()-> - AddObserver(this, NOTIFY_WEB_CONTENTS_DISCONNECTED, + AddObserver(this, NotificationType::WEB_CONTENTS_DISCONNECTED, Source<WebContents>(contents_)); // This information is needed to show the dialog HTML content. @@ -31,7 +32,7 @@ ModalHtmlDialogDelegate::~ModalHtmlDialogDelegate() { void ModalHtmlDialogDelegate::Observe(NotificationType type, const NotificationSource& source, const NotificationDetails& details) { - DCHECK(type == NOTIFY_WEB_CONTENTS_DISCONNECTED); + DCHECK(type == NotificationType::WEB_CONTENTS_DISCONNECTED); DCHECK(Source<WebContents>(source).ptr() == contents_); RemoveObserver(); } @@ -68,8 +69,9 @@ void ModalHtmlDialogDelegate::RemoveObserver() { if (!contents_) return; - NotificationService::current()-> - RemoveObserver(this, NOTIFY_WEB_CONTENTS_DISCONNECTED, + NotificationService::current()->RemoveObserver( + this, + NotificationType::WEB_CONTENTS_DISCONNECTED, Source<WebContents>(contents_)); contents_ = NULL; // No longer safe to access. } |