Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CONTENT_BROWSER_DEVTOOLS_EMBEDDED_WORKER_DEVTOOLS_AGENT_HOST_H_ | 5 #ifndef CONTENT_BROWSER_DEVTOOLS_EMBEDDED_WORKER_DEVTOOLS_AGENT_HOST_H_ |
| 6 #define CONTENT_BROWSER_DEVTOOLS_EMBEDDED_WORKER_DEVTOOLS_AGENT_HOST_H_ | 6 #define CONTENT_BROWSER_DEVTOOLS_EMBEDDED_WORKER_DEVTOOLS_AGENT_HOST_H_ |
| 7 | 7 |
| 8 #include "content/browser/devtools/embedded_worker_devtools_manager.h" | 8 #include "content/browser/devtools/embedded_worker_devtools_manager.h" |
| 9 #include "content/browser/devtools/ipc_devtools_agent_host.h" | 9 #include "content/browser/devtools/ipc_devtools_agent_host.h" |
| 10 #include "content/browser/devtools/protocol/devtools_protocol_handler_impl.h" | |
| 10 #include "ipc/ipc_listener.h" | 11 #include "ipc/ipc_listener.h" |
| 11 | 12 |
| 12 namespace content { | 13 namespace content { |
| 13 | 14 |
| 14 class SharedWorkerInstance; | 15 class SharedWorkerInstance; |
| 15 | 16 |
| 17 namespace devtools { | |
| 18 namespace worker { class Client; } | |
| 19 } | |
| 20 | |
| 16 class EmbeddedWorkerDevToolsAgentHost : public IPCDevToolsAgentHost, | 21 class EmbeddedWorkerDevToolsAgentHost : public IPCDevToolsAgentHost, |
| 17 public IPC::Listener { | 22 public IPC::Listener { |
| 18 public: | 23 public: |
| 19 typedef EmbeddedWorkerDevToolsManager::WorkerId WorkerId; | 24 typedef EmbeddedWorkerDevToolsManager::WorkerId WorkerId; |
| 20 typedef EmbeddedWorkerDevToolsManager::ServiceWorkerIdentifier | 25 typedef EmbeddedWorkerDevToolsManager::ServiceWorkerIdentifier |
| 21 ServiceWorkerIdentifier; | 26 ServiceWorkerIdentifier; |
| 22 | 27 |
| 23 EmbeddedWorkerDevToolsAgentHost(WorkerId worker_id, | 28 EmbeddedWorkerDevToolsAgentHost(WorkerId worker_id, |
| 24 const SharedWorkerInstance& shared_worker); | 29 const SharedWorkerInstance& shared_worker); |
| 25 | 30 |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 64 WORKER_PAUSED_FOR_REATTACH, | 69 WORKER_PAUSED_FOR_REATTACH, |
| 65 }; | 70 }; |
| 66 | 71 |
| 67 void AttachToWorker(); | 72 void AttachToWorker(); |
| 68 void DetachFromWorker(); | 73 void DetachFromWorker(); |
| 69 void WorkerCreated(); | 74 void WorkerCreated(); |
| 70 void OnDispatchOnInspectorFrontend(const std::string& message, | 75 void OnDispatchOnInspectorFrontend(const std::string& message, |
| 71 uint32 total_size); | 76 uint32 total_size); |
| 72 void OnSaveAgentRuntimeState(const std::string& state); | 77 void OnSaveAgentRuntimeState(const std::string& state); |
| 73 | 78 |
| 79 void InitWorkerDomainClient(); | |
|
dgozman
2014/11/20 14:38:07
CreateWorkerDomainClient?
vkuzkokov
2014/11/20 15:05:07
Removed.
| |
| 80 | |
| 81 scoped_ptr<devtools::worker::Client> worker_domain_client_; | |
| 74 scoped_ptr<SharedWorkerInstance> shared_worker_; | 82 scoped_ptr<SharedWorkerInstance> shared_worker_; |
| 75 scoped_ptr<ServiceWorkerIdentifier> service_worker_; | 83 scoped_ptr<ServiceWorkerIdentifier> service_worker_; |
| 76 WorkerState state_; | 84 WorkerState state_; |
| 77 WorkerId worker_id_; | 85 WorkerId worker_id_; |
| 78 std::string saved_agent_state_; | 86 std::string saved_agent_state_; |
| 79 DISALLOW_COPY_AND_ASSIGN(EmbeddedWorkerDevToolsAgentHost); | 87 DISALLOW_COPY_AND_ASSIGN(EmbeddedWorkerDevToolsAgentHost); |
| 80 }; | 88 }; |
| 81 | 89 |
| 82 } // namespace content | 90 } // namespace content |
| 83 | 91 |
| 84 #endif // CONTENT_BROWSER_DEVTOOLS_EMBEDDED_WORKER_DEVTOOLS_AGENT_HOST_H_ | 92 #endif // CONTENT_BROWSER_DEVTOOLS_EMBEDDED_WORKER_DEVTOOLS_AGENT_HOST_H_ |
| OLD | NEW |