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/debugger/debugger_node.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/debugger/debugger_node.cc')
-rw-r--r-- | chrome/browser/debugger/debugger_node.cc | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/chrome/browser/debugger/debugger_node.cc b/chrome/browser/debugger/debugger_node.cc index 8a28b49..a7f419c 100644 --- a/chrome/browser/debugger/debugger_node.cc +++ b/chrome/browser/debugger/debugger_node.cc @@ -13,6 +13,7 @@ #include "chrome/browser/renderer_host/render_view_host.h" #include "chrome/browser/tab_contents/web_contents.h" #include "chrome/browser/debugger/debugger_shell.h" +#include "chrome/common/notification_service.h" DebuggerNode::DebuggerNode() : valid_(true), observing_(false), data_(NULL) { } @@ -159,13 +160,15 @@ BrowserNode::BrowserNode(Browser *b) { NotificationService* service = NotificationService::current(); DCHECK(service); - service->AddObserver(this, NOTIFY_BROWSER_CLOSED, Source<Browser>(b)); + service->AddObserver( + this, NotificationType::BROWSER_CLOSED, Source<Browser>(b)); observing_ = true; } void BrowserNode::StopObserving(NotificationService *service) { Browser *b = static_cast<Browser*>(data_); - service->RemoveObserver(this, NOTIFY_BROWSER_CLOSED, Source<Browser>(b)); + service->RemoveObserver( + this, NotificationType::BROWSER_CLOSED, Source<Browser>(b)); } BrowserNode* BrowserNode::BrowserAtIndex(int index) { @@ -242,7 +245,8 @@ TabListNode::TabListNode(Browser* b) { NotificationService* service = NotificationService::current(); DCHECK(service); - service->AddObserver(this, NOTIFY_BROWSER_CLOSED, Source<Browser>(b)); + service->AddObserver( + this, NotificationType::BROWSER_CLOSED, Source<Browser>(b)); observing_ = true; } @@ -263,7 +267,8 @@ Browser* TabListNode::GetBrowser() { void TabListNode::StopObserving(NotificationService *service) { Browser *b = static_cast<Browser*>(data_); - service->RemoveObserver(this, NOTIFY_BROWSER_CLOSED, Source<Browser>(b)); + service->RemoveObserver( + this, NotificationType::BROWSER_CLOSED, Source<Browser>(b)); } v8::Handle<v8::Value> TabListNode::IndexGetter(uint32_t index, @@ -286,7 +291,7 @@ TabNode::TabNode(TabContents *c) { NotificationService* service = NotificationService::current(); DCHECK(service); - service->AddObserver(this, NOTIFY_TAB_CLOSING, + service->AddObserver(this, NotificationType::TAB_CLOSING, Source<NavigationController>(c->controller())); observing_ = true; } @@ -296,7 +301,7 @@ TabNode::~TabNode() { void TabNode::StopObserving(NotificationService *service) { NavigationController *c = static_cast<NavigationController*>(data_); - service->RemoveObserver(this, NOTIFY_TAB_CLOSING, + service->RemoveObserver(this, NotificationType::TAB_CLOSING, Source<NavigationController>(c)); } |