OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_PROTOCOL_DEVTOOLS_DOMAIN_HANDLER_H_ | 5 #ifndef CONTENT_BROWSER_DEVTOOLS_PROTOCOL_DEVTOOLS_DOMAIN_HANDLER_H_ |
6 #define CONTENT_BROWSER_DEVTOOLS_PROTOCOL_DEVTOOLS_DOMAIN_HANDLER_H_ | 6 #define CONTENT_BROWSER_DEVTOOLS_PROTOCOL_DEVTOOLS_DOMAIN_HANDLER_H_ |
7 | 7 |
8 #include "content/browser/devtools/protocol/forward.h" | 8 #include "content/browser/devtools/protocol/forward.h" |
9 | 9 |
10 namespace content { | 10 namespace content { |
11 | 11 |
| 12 class DevToolsSession; |
| 13 class DevToolsAgentHostImpl; |
12 class RenderFrameHostImpl; | 14 class RenderFrameHostImpl; |
13 | 15 |
14 namespace protocol { | 16 namespace protocol { |
15 | 17 |
16 class DevToolsDomainHandler { | 18 class DevToolsDomainHandler { |
17 public: | 19 public: |
18 explicit DevToolsDomainHandler(const std::string& name); | 20 explicit DevToolsDomainHandler(const std::string& name); |
19 virtual ~DevToolsDomainHandler(); | 21 virtual ~DevToolsDomainHandler(); |
20 | 22 |
21 virtual void SetRenderFrameHost(RenderFrameHostImpl* host); | 23 virtual void SetRenderFrameHost(RenderFrameHostImpl* host); |
22 virtual void Wire(UberDispatcher* dispatcher); | 24 virtual void Wire(UberDispatcher* dispatcher); |
23 virtual Response Disable(); | 25 virtual Response Disable(); |
24 | 26 |
25 const std::string& name() const { return name_; } | 27 const std::string& name() const { return name_; } |
26 | 28 |
| 29 protected: |
| 30 static DevToolsSession* GetFirstSession(DevToolsAgentHostImpl* host); |
| 31 |
27 private: | 32 private: |
28 std::string name_; | 33 std::string name_; |
29 | 34 |
30 DISALLOW_COPY_AND_ASSIGN(DevToolsDomainHandler); | 35 DISALLOW_COPY_AND_ASSIGN(DevToolsDomainHandler); |
31 }; | 36 }; |
32 | 37 |
33 } // namespace protocol | 38 } // namespace protocol |
34 } // namespace content | 39 } // namespace content |
35 | 40 |
36 #endif // CONTENT_BROWSER_DEVTOOLS_PROTOCOL_DEVTOOLS_DOMAIN_HANDLER_H_ | 41 #endif // CONTENT_BROWSER_DEVTOOLS_PROTOCOL_DEVTOOLS_DOMAIN_HANDLER_H_ |
OLD | NEW |