Chromium Code Reviews| Index: content/browser/devtools/embedded_worker_devtools_manager.h |
| diff --git a/content/browser/devtools/embedded_worker_devtools_manager.h b/content/browser/devtools/embedded_worker_devtools_manager.h |
| index 3b15c8f209967344375d3a70ca3325de225fb4e2..31c4fcb72e714a424c8a959878e31c95b0703c94 100644 |
| --- a/content/browser/devtools/embedded_worker_devtools_manager.h |
| +++ b/content/browser/devtools/embedded_worker_devtools_manager.h |
| @@ -5,8 +5,9 @@ |
| #ifndef CONTENT_BROWSER_DEVTOOLS_EMBEDDED_WORKER_DEVTOOLS_MANAGER_H_ |
| #define CONTENT_BROWSER_DEVTOOLS_EMBEDDED_WORKER_DEVTOOLS_MANAGER_H_ |
| +#include <map> |
| + |
| #include "base/basictypes.h" |
| -#include "base/containers/scoped_ptr_hash_map.h" |
| #include "base/gtest_prod_util.h" |
| #include "base/memory/scoped_vector.h" |
| #include "base/memory/singleton.h" |
| @@ -85,31 +86,7 @@ class CONTENT_EXPORT EmbeddedWorkerDevToolsManager { |
| WORKER_PAUSED_FOR_REATTACH, |
| }; |
| - class WorkerInfo { |
| - public: |
| - // Creates WorkerInfo for SharedWorker. |
| - explicit WorkerInfo(const SharedWorkerInstance& instance); |
| - // Creates WorkerInfo for ServiceWorker. |
| - explicit WorkerInfo(const ServiceWorkerIdentifier& service_worker_id); |
| - ~WorkerInfo(); |
| - |
| - WorkerState state() { return state_; } |
| - void set_state(WorkerState new_state) { state_ = new_state; } |
| - EmbeddedWorkerDevToolsAgentHost* agent_host() { return agent_host_; } |
| - void set_agent_host(EmbeddedWorkerDevToolsAgentHost* agent_host) { |
| - agent_host_ = agent_host; |
| - } |
| - bool Matches(const SharedWorkerInstance& other); |
| - bool Matches(const ServiceWorkerIdentifier& other); |
| - |
| - private: |
| - scoped_ptr<SharedWorkerInstance> shared_worker_instance_; |
| - scoped_ptr<ServiceWorkerIdentifier> service_worker_id_; |
| - WorkerState state_; |
| - EmbeddedWorkerDevToolsAgentHost* agent_host_; |
| - }; |
| - |
| - typedef base::ScopedPtrHashMap<WorkerId, WorkerInfo> WorkerInfoMap; |
| + typedef std::map<WorkerId, EmbeddedWorkerDevToolsAgentHost*> WorkerInfoMap; |
|
horo
2014/08/06 07:47:50
I think if you use
std::map<WorkerId, scoped_refp
horo
2014/08/06 07:47:50
nit: I prefer WorkerAgentHostMap.
vkuzkokov
2014/08/06 09:07:39
workers_ keeps live instances of EWDTAH. they are
vkuzkokov
2014/08/06 09:07:39
AgentHostMap.
horo
2014/08/06 10:08:40
I see.
Sorry I misunderstood
|
| EmbeddedWorkerDevToolsManager(); |
| virtual ~EmbeddedWorkerDevToolsManager(); |
| @@ -121,7 +98,7 @@ class CONTENT_EXPORT EmbeddedWorkerDevToolsManager { |
| WorkerInfoMap::iterator FindExistingServiceWorkerInfo( |
| const ServiceWorkerIdentifier& service_worker_id); |
| - void MoveToPausedState(const WorkerId& id, const WorkerInfoMap::iterator& it); |
| + void WorkerRestarted(const WorkerId& id, const WorkerInfoMap::iterator& it); |
| // Resets to its initial state as if newly created. |
| void ResetForTesting(); |