| 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_SHARED_WORKER_DEVTOOLS_AGENT_HOST_H_ | 5 #ifndef CONTENT_BROWSER_DEVTOOLS_SHARED_WORKER_DEVTOOLS_AGENT_HOST_H_ |
| 6 #define CONTENT_BROWSER_DEVTOOLS_SHARED_WORKER_DEVTOOLS_AGENT_HOST_H_ | 6 #define CONTENT_BROWSER_DEVTOOLS_SHARED_WORKER_DEVTOOLS_AGENT_HOST_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "content/browser/devtools/worker_devtools_agent_host.h" | 9 #include "content/browser/devtools/worker_devtools_agent_host.h" |
| 10 | 10 |
| 11 namespace content { | 11 namespace content { |
| 12 | 12 |
| 13 class SharedWorkerInstance; | 13 class SharedWorkerInstance; |
| 14 | 14 |
| 15 class SharedWorkerDevToolsAgentHost : public WorkerDevToolsAgentHost { | 15 class SharedWorkerDevToolsAgentHost : public WorkerDevToolsAgentHost { |
| 16 public: | 16 public: |
| 17 using List = std::vector<scoped_refptr<SharedWorkerDevToolsAgentHost>>; | 17 using List = std::vector<scoped_refptr<SharedWorkerDevToolsAgentHost>>; |
| 18 | 18 |
| 19 SharedWorkerDevToolsAgentHost(WorkerId worker_id, | 19 SharedWorkerDevToolsAgentHost(WorkerId worker_id, |
| 20 const SharedWorkerInstance& shared_worker); | 20 const SharedWorkerInstance& shared_worker); |
| 21 | 21 |
| 22 // DevToolsAgentHost override. | 22 // DevToolsAgentHost override. |
| 23 std::string GetType() override; | 23 Type GetType() override; |
| 24 std::string GetTitle() override; | 24 std::string GetTitle() override; |
| 25 GURL GetURL() override; | 25 GURL GetURL() override; |
| 26 bool Activate() override; | 26 bool Activate() override; |
| 27 void Reload() override; | |
| 28 bool Close() override; | 27 bool Close() override; |
| 29 | 28 |
| 30 bool Matches(const SharedWorkerInstance& other); | 29 bool Matches(const SharedWorkerInstance& other); |
| 31 | 30 |
| 32 private: | 31 private: |
| 33 friend class SharedWorkerDevToolsManagerTest; | 32 friend class SharedWorkerDevToolsManagerTest; |
| 34 | 33 |
| 35 ~SharedWorkerDevToolsAgentHost() override; | 34 ~SharedWorkerDevToolsAgentHost() override; |
| 36 std::unique_ptr<SharedWorkerInstance> shared_worker_; | 35 std::unique_ptr<SharedWorkerInstance> shared_worker_; |
| 37 | 36 |
| 38 DISALLOW_COPY_AND_ASSIGN(SharedWorkerDevToolsAgentHost); | 37 DISALLOW_COPY_AND_ASSIGN(SharedWorkerDevToolsAgentHost); |
| 39 }; | 38 }; |
| 40 | 39 |
| 41 } // namespace content | 40 } // namespace content |
| 42 | 41 |
| 43 #endif // CONTENT_BROWSER_DEVTOOLS_SHARED_WORKER_DEVTOOLS_AGENT_HOST_H_ | 42 #endif // CONTENT_BROWSER_DEVTOOLS_SHARED_WORKER_DEVTOOLS_AGENT_HOST_H_ |
| OLD | NEW |