| 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_SERVICE_WORKER_DEVTOOLS_AGENT_HOST_H_ | 5 #ifndef CONTENT_BROWSER_DEVTOOLS_SERVICE_WORKER_DEVTOOLS_AGENT_HOST_H_ |
| 6 #define CONTENT_BROWSER_DEVTOOLS_SERVICE_WORKER_DEVTOOLS_AGENT_HOST_H_ | 6 #define CONTENT_BROWSER_DEVTOOLS_SERVICE_WORKER_DEVTOOLS_AGENT_HOST_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| 11 | 11 |
| 12 #include "base/macros.h" | 12 #include "base/macros.h" |
| 13 #include "base/time/time.h" | 13 #include "base/time/time.h" |
| 14 #include "content/browser/devtools/protocol/network_handler.h" | |
| 15 #include "content/browser/devtools/service_worker_devtools_manager.h" | 14 #include "content/browser/devtools/service_worker_devtools_manager.h" |
| 16 #include "content/browser/devtools/worker_devtools_agent_host.h" | 15 #include "content/browser/devtools/worker_devtools_agent_host.h" |
| 17 | 16 |
| 18 namespace content { | 17 namespace content { |
| 19 | 18 |
| 20 class ServiceWorkerDevToolsAgentHost : public WorkerDevToolsAgentHost { | 19 class ServiceWorkerDevToolsAgentHost : public WorkerDevToolsAgentHost { |
| 21 public: | 20 public: |
| 22 using List = std::vector<scoped_refptr<ServiceWorkerDevToolsAgentHost>>; | 21 using List = std::vector<scoped_refptr<ServiceWorkerDevToolsAgentHost>>; |
| 23 using Map = std::map<std::string, | 22 using Map = std::map<std::string, |
| 24 scoped_refptr<ServiceWorkerDevToolsAgentHost>>; | 23 scoped_refptr<ServiceWorkerDevToolsAgentHost>>; |
| (...skipping 29 matching lines...) Expand all Loading... |
| 54 base::Time version_installed_time() const { return version_installed_time_; } | 53 base::Time version_installed_time() const { return version_installed_time_; } |
| 55 | 54 |
| 56 // Returns the time when the ServiceWorker was doomed. | 55 // Returns the time when the ServiceWorker was doomed. |
| 57 base::Time version_doomed_time() const { return version_doomed_time_; } | 56 base::Time version_doomed_time() const { return version_doomed_time_; } |
| 58 | 57 |
| 59 bool Matches(const ServiceWorkerIdentifier& other); | 58 bool Matches(const ServiceWorkerIdentifier& other); |
| 60 | 59 |
| 61 private: | 60 private: |
| 62 ~ServiceWorkerDevToolsAgentHost() override; | 61 ~ServiceWorkerDevToolsAgentHost() override; |
| 63 std::unique_ptr<ServiceWorkerIdentifier> service_worker_; | 62 std::unique_ptr<ServiceWorkerIdentifier> service_worker_; |
| 64 std::unique_ptr<devtools::network::NetworkHandler> network_handler_; | |
| 65 base::Time version_installed_time_; | 63 base::Time version_installed_time_; |
| 66 base::Time version_doomed_time_; | 64 base::Time version_doomed_time_; |
| 67 | 65 |
| 68 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerDevToolsAgentHost); | 66 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerDevToolsAgentHost); |
| 69 }; | 67 }; |
| 70 | 68 |
| 71 } // namespace content | 69 } // namespace content |
| 72 | 70 |
| 73 #endif // CONTENT_BROWSER_DEVTOOLS_SERVICE_WORKER_DEVTOOLS_AGENT_HOST_H_ | 71 #endif // CONTENT_BROWSER_DEVTOOLS_SERVICE_WORKER_DEVTOOLS_AGENT_HOST_H_ |
| OLD | NEW |