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