diff options
Diffstat (limited to 'chrome/browser/debugger')
-rw-r--r-- | chrome/browser/debugger/debugger_host_impl.cpp | 5 | ||||
-rw-r--r-- | chrome/browser/debugger/debugger_node.cc | 17 | ||||
-rw-r--r-- | chrome/browser/debugger/debugger_node.h | 11 | ||||
-rw-r--r-- | chrome/browser/debugger/debugger_window.cc | 4 |
4 files changed, 22 insertions, 15 deletions
diff --git a/chrome/browser/debugger/debugger_host_impl.cpp b/chrome/browser/debugger/debugger_host_impl.cpp index 2f46feb..23afdfd 100644 --- a/chrome/browser/debugger/debugger_host_impl.cpp +++ b/chrome/browser/debugger/debugger_host_impl.cpp @@ -19,7 +19,8 @@ class TabContentsReference : public NotificationObserver { NotificationService* service = NotificationService::current(); DCHECK(service); - service->AddObserver(this, NOTIFY_TAB_CLOSING, + service->AddObserver(this, + NotificationType::TAB_CLOSING, Source<NavigationController>(navigation_controller_)); observing_ = true; } @@ -50,7 +51,7 @@ class TabContentsReference : public NotificationObserver { DCHECK(service); service->RemoveObserver( this, - NOTIFY_TAB_CLOSING, + NotificationType::TAB_CLOSING, Source<NavigationController>(navigation_controller_)); observing_ = false; } 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)); } diff --git a/chrome/browser/debugger/debugger_node.h b/chrome/browser/debugger/debugger_node.h index 06dc390..0a38cd5 100644 --- a/chrome/browser/debugger/debugger_node.h +++ b/chrome/browser/debugger/debugger_node.h @@ -11,17 +11,18 @@ // For example, objects aren't being cached properly (browser.foo = 1 wouldn't // be remembered), and setters aren't implemented to begin with. -#ifndef CHROME_BROWSER_DEBUGGER_DEBUGGER_NODE_H__ -#define CHROME_BROWSER_DEBUGGER_DEBUGGER_NODE_H__ +#ifndef CHROME_BROWSER_DEBUGGER_DEBUGGER_NODE_H_ +#define CHROME_BROWSER_DEBUGGER_DEBUGGER_NODE_H_ #include "base/basictypes.h" #include "base/ref_counted.h" -#include "chrome/common/notification_service.h" +#include "chrome/common/notification_observer.h" #include "v8/include/v8.h" class Browser; class TabContents; class DebuggerShell; +class NotificationService; class WebContents; class DebuggerNode : public NotificationObserver { @@ -232,6 +233,4 @@ private: T* data_; }; - -#endif // CHROME_BROWSER_DEBUGGER_DEBUGGER_NODE_H__ - +#endif // CHROME_BROWSER_DEBUGGER_DEBUGGER_NODE_H_ diff --git a/chrome/browser/debugger/debugger_window.cc b/chrome/browser/debugger/debugger_window.cc index 36ebf69..bd61c95 100644 --- a/chrome/browser/debugger/debugger_window.cc +++ b/chrome/browser/debugger/debugger_window.cc @@ -2,11 +2,13 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include "chrome/browser/debugger/debugger_window.h" + #include "base/string_util.h" +#include "base/values.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/debugger/debugger_host_impl.h" #include "chrome/browser/debugger/debugger_view.h" -#include "chrome/browser/debugger/debugger_window.h" #include "chrome/browser/debugger/debugger_wrapper.h" #include "chrome/browser/tab_contents/constrained_window.h" #include "chrome/browser/tab_contents/tab_contents.h" |