Chromium Code Reviews| Index: content/browser/devtools/protocol/service_worker_handler.h |
| diff --git a/content/browser/devtools/protocol/service_worker_handler.h b/content/browser/devtools/protocol/service_worker_handler.h |
| index c131d7ffb96acc235be4311eb3adb90ccafea9f8..e2d1fad2690a696c765a8c51ba5b95957c25af92 100644 |
| --- a/content/browser/devtools/protocol/service_worker_handler.h |
| +++ b/content/browser/devtools/protocol/service_worker_handler.h |
| @@ -7,12 +7,22 @@ |
| #include <set> |
| +#include "base/memory/weak_ptr.h" |
| #include "content/browser/devtools/protocol/devtools_protocol_handler.h" |
| #include "content/browser/devtools/worker_devtools_manager.h" |
| +#include "content/browser/service_worker/service_worker_info.h" |
| #include "content/public/browser/devtools_agent_host.h" |
| #include "content/public/browser/devtools_agent_host_client.h" |
| +// Windows headers will redefine SendMessage. |
| +#ifdef SendMessage |
| +#undef SendMessage |
| +#endif |
| + |
| namespace content { |
| + |
| +class RenderViewHostImpl; |
| + |
| namespace devtools { |
| namespace service_worker { |
| @@ -24,6 +34,7 @@ class ServiceWorkerHandler : public DevToolsAgentHostClient, |
| ServiceWorkerHandler(); |
| ~ServiceWorkerHandler() override; |
| + void SetRenderViewHost(RenderViewHostImpl* render_view_host); |
| void SetClient(scoped_ptr<Client> client); |
| void Detached(); |
| @@ -47,12 +58,18 @@ class ServiceWorkerHandler : public DevToolsAgentHostClient, |
| const std::string& message) override; |
| void AgentHostClosed(DevToolsAgentHost* agent_host, |
| bool replaced_with_another_client) override; |
| + void OnGetRegistrations( |
| + DevToolsCommandId command_id, |
| + const std::vector<ServiceWorkerRegistrationInfo>& registrations); |
| + RenderViewHostImpl* render_view_host_; |
|
pfeldman
2015/03/06 10:44:37
We probably want to move off rvh to the main rfh e
horo
2015/03/09 12:33:32
Done.
|
| scoped_ptr<Client> client_; |
| using AttachedHosts = std::map<std::string, |
| scoped_refptr<DevToolsAgentHost>>; |
| AttachedHosts attached_hosts_; |
| + base::WeakPtrFactory<ServiceWorkerHandler> weak_factory_; |
| + |
| DISALLOW_COPY_AND_ASSIGN(ServiceWorkerHandler); |
| }; |