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 0a9c19367f51ed87f4beb7ce060958e861f3b61b..dd1e3def92da37c62962ba14b1b3dfd595b18b64 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/service_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 |
|
pfeldman
2015/03/09 19:16:49
We can rename it instead. Where does it articulate
horo
2015/03/10 01:34:07
In windows environment, winuser.h has this line "#
|
| +#undef SendMessage |
| +#endif |
| + |
| namespace content { |
| + |
| +class RenderFrameHost; |
| + |
| namespace devtools { |
| namespace service_worker { |
| @@ -24,6 +34,7 @@ class ServiceWorkerHandler : public DevToolsAgentHostClient, |
| ServiceWorkerHandler(); |
| ~ServiceWorkerHandler() override; |
| + void SetRenderFrameHost(RenderFrameHost* render_frame_host); |
| void SetClient(scoped_ptr<Client> client); |
| void Detached(); |
| @@ -40,16 +51,28 @@ class ServiceWorkerHandler : public DevToolsAgentHostClient, |
| void WorkerDestroyed(DevToolsAgentHost* host) override; |
| private: |
| + class ContextObserver; |
| + |
| // DevToolsAgentHostClient overrides. |
| void DispatchProtocolMessage(DevToolsAgentHost* agent_host, |
| const std::string& message) override; |
| void AgentHostClosed(DevToolsAgentHost* agent_host, |
| bool replaced_with_another_client) override; |
| + void OnWorkerRegistrationUpdated( |
| + const std::vector<ServiceWorkerRegistrationInfo>& registrations); |
| + void OnWorkerVersionUpdated( |
| + const std::vector<ServiceWorkerVersionInfo>& registrations); |
| + void OnWorkerRegistrationDeleted(int64 registration_id); |
| + |
| + RenderFrameHost* render_frame_host_; |
| scoped_ptr<Client> client_; |
| using AttachedHosts = std::map<std::string, |
| scoped_refptr<DevToolsAgentHost>>; |
| AttachedHosts attached_hosts_; |
| + scoped_refptr<ContextObserver> context_observer_; |
| + |
| + base::WeakPtrFactory<ServiceWorkerHandler> weak_factory_; |
| DISALLOW_COPY_AND_ASSIGN(ServiceWorkerHandler); |
| }; |