Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(319)

Unified Diff: content/browser/debugger/worker_devtools_manager.cc

Issue 10968064: Move the NOTIFICATION_APP_TERMINATING notification from content to chrome, since it's fired by chro… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: cros compile Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/common/chrome_notification_types.h ('k') | content/public/browser/notification_types.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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)
« no previous file with comments | « chrome/common/chrome_notification_types.h ('k') | content/public/browser/notification_types.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698