| Index: content/browser/debugger/worker_devtools_manager.cc
|
| ===================================================================
|
| --- content/browser/debugger/worker_devtools_manager.cc (revision 158279)
|
| +++ content/browser/debugger/worker_devtools_manager.cc (working copy)
|
| @@ -16,10 +16,6 @@
|
| #include "content/public/browser/browser_thread.h"
|
| #include "content/public/browser/child_process_data.h"
|
| #include "content/public/browser/devtools_agent_host_registry.h"
|
| -#include "content/public/browser/notification_observer.h"
|
| -#include "content/public/browser/notification_registrar.h"
|
| -#include "content/public/browser/notification_service.h"
|
| -#include "content/public/browser/notification_types.h"
|
| #include "content/public/common/process_type.h"
|
| #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebCString.h"
|
| #include "third_party/WebKit/Source/WebKit/chromium/public/WebDevToolsAgent.h"
|
| @@ -39,8 +35,7 @@
|
| worker_route_id);
|
| }
|
|
|
| -class WorkerDevToolsManager::AgentHosts
|
| - : private content::NotificationObserver {
|
| +class WorkerDevToolsManager::AgentHosts {
|
| public:
|
| static void Add(WorkerId id, WorkerDevToolsAgentHost* host) {
|
| DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
|
| @@ -72,20 +67,12 @@
|
|
|
| private:
|
| AgentHosts() {
|
| - registrar_.Add(this, content::NOTIFICATION_APP_TERMINATING,
|
| - content::NotificationService::AllSources());
|
| }
|
| ~AgentHosts() {}
|
|
|
| - // content::NotificationObserver implementation.
|
| - virtual void Observe(int type,
|
| - const content::NotificationSource&,
|
| - const content::NotificationDetails&) OVERRIDE;
|
| -
|
| static AgentHosts* instance_;
|
| typedef std::map<WorkerId, WorkerDevToolsAgentHost*> Instances;
|
| Instances map_;
|
| - content::NotificationRegistrar registrar_;
|
| };
|
|
|
| WorkerDevToolsManager::AgentHosts*
|
| @@ -235,18 +222,6 @@
|
| WorkerDevToolsManager::DetachedClientHosts*
|
| WorkerDevToolsManager::DetachedClientHosts::instance_ = NULL;
|
|
|
| -
|
| -void WorkerDevToolsManager::AgentHosts::Observe(
|
| - int type,
|
| - const content::NotificationSource&,
|
| - const content::NotificationDetails&) {
|
| - DCHECK(type == content::NOTIFICATION_APP_TERMINATING);
|
| - Instances copy(map_);
|
| - for (Instances::iterator it = copy.begin(); it != copy.end(); ++it)
|
| - it->second->WorkerDestroyed();
|
| - DCHECK(!instance_);
|
| -}
|
| -
|
| struct WorkerDevToolsManager::InspectedWorker {
|
| InspectedWorker(WorkerProcessHost* host, int route_id, const GURL& url,
|
| const string16& name)
|
|
|