OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_SHELL_BROWSER_SHELL_DEVTOOLS_FRONTEND_H_ | 5 #ifndef CONTENT_SHELL_BROWSER_SHELL_DEVTOOLS_FRONTEND_H_ |
6 #define CONTENT_SHELL_BROWSER_SHELL_DEVTOOLS_FRONTEND_H_ | 6 #define CONTENT_SHELL_BROWSER_SHELL_DEVTOOLS_FRONTEND_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
12 #include "content/public/browser/devtools_agent_host.h" | 12 #include "content/public/browser/devtools_agent_host.h" |
13 #include "content/public/browser/devtools_frontend_host.h" | 13 #include "content/public/browser/devtools_frontend_host.h" |
14 #include "content/public/browser/web_contents_observer.h" | 14 #include "content/public/browser/web_contents_observer.h" |
| 15 #include "net/url_request/url_fetcher_delegate.h" |
15 | 16 |
16 namespace content { | 17 namespace content { |
17 | 18 |
18 class RenderViewHost; | 19 class RenderViewHost; |
19 class Shell; | 20 class Shell; |
20 class WebContents; | 21 class WebContents; |
21 | 22 |
22 class ShellDevToolsFrontend : public WebContentsObserver, | 23 class ShellDevToolsFrontend : public WebContentsObserver, |
23 public DevToolsFrontendHost::Delegate, | 24 public DevToolsFrontendHost::Delegate, |
24 public DevToolsAgentHostClient { | 25 public DevToolsAgentHostClient, |
| 26 public net::URLFetcherDelegate { |
25 public: | 27 public: |
26 static ShellDevToolsFrontend* Show(WebContents* inspected_contents); | 28 static ShellDevToolsFrontend* Show(WebContents* inspected_contents); |
27 | 29 |
28 void Activate(); | 30 void Activate(); |
29 void Focus(); | 31 void Focus(); |
30 void InspectElementAt(int x, int y); | 32 void InspectElementAt(int x, int y); |
31 void Close(); | 33 void Close(); |
32 | 34 |
33 void DisconnectFromTarget(); | 35 void DisconnectFromTarget(); |
34 | 36 |
(...skipping 15 matching lines...) Expand all Loading... |
50 void DidNavigateMainFrame( | 52 void DidNavigateMainFrame( |
51 const LoadCommittedDetails& details, | 53 const LoadCommittedDetails& details, |
52 const FrameNavigateParams& params) override; | 54 const FrameNavigateParams& params) override; |
53 void WebContentsDestroyed() override; | 55 void WebContentsDestroyed() override; |
54 | 56 |
55 // content::DevToolsFrontendHost::Delegate implementation. | 57 // content::DevToolsFrontendHost::Delegate implementation. |
56 void HandleMessageFromDevToolsFrontend(const std::string& message) override; | 58 void HandleMessageFromDevToolsFrontend(const std::string& message) override; |
57 void HandleMessageFromDevToolsFrontendToBackend( | 59 void HandleMessageFromDevToolsFrontendToBackend( |
58 const std::string& message) override; | 60 const std::string& message) override; |
59 | 61 |
| 62 // net::URLFetcherDelegate overrides. |
| 63 void OnURLFetchComplete(const net::URLFetcher* source) override; |
| 64 |
60 Shell* frontend_shell_; | 65 Shell* frontend_shell_; |
61 scoped_refptr<DevToolsAgentHost> agent_host_; | 66 scoped_refptr<DevToolsAgentHost> agent_host_; |
62 scoped_ptr<DevToolsFrontendHost> frontend_host_; | 67 scoped_ptr<DevToolsFrontendHost> frontend_host_; |
| 68 using PendingRequestsMap = std::map<const net::URLFetcher*, int>; |
| 69 PendingRequestsMap pending_requests_; |
63 | 70 |
64 DISALLOW_COPY_AND_ASSIGN(ShellDevToolsFrontend); | 71 DISALLOW_COPY_AND_ASSIGN(ShellDevToolsFrontend); |
65 }; | 72 }; |
66 | 73 |
67 } // namespace content | 74 } // namespace content |
68 | 75 |
69 #endif // CONTENT_SHELL_BROWSER_SHELL_DEVTOOLS_FRONTEND_H_ | 76 #endif // CONTENT_SHELL_BROWSER_SHELL_DEVTOOLS_FRONTEND_H_ |
OLD | NEW |