OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_RENDER_FRAME_DEVTOOLS_AGENT_HOST_H_ | 5 #ifndef CONTENT_BROWSER_DEVTOOLS_RENDER_FRAME_DEVTOOLS_AGENT_HOST_H_ |
6 #define CONTENT_BROWSER_DEVTOOLS_RENDER_FRAME_DEVTOOLS_AGENT_HOST_H_ | 6 #define CONTENT_BROWSER_DEVTOOLS_RENDER_FRAME_DEVTOOLS_AGENT_HOST_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <memory> | 9 #include <memory> |
10 | 10 |
11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
12 #include "base/macros.h" | 12 #include "base/macros.h" |
13 #include "build/build_config.h" | 13 #include "build/build_config.h" |
14 #include "content/browser/devtools/devtools_agent_host_impl.h" | 14 #include "content/browser/devtools/devtools_agent_host_impl.h" |
15 #include "content/common/content_export.h" | 15 #include "content/common/content_export.h" |
16 #include "content/public/browser/web_contents_observer.h" | 16 #include "content/public/browser/web_contents_observer.h" |
| 17 #include "net/base/net_errors.h" |
17 | 18 |
18 #if defined(OS_ANDROID) | 19 #if defined(OS_ANDROID) |
19 #include "ui/android/view_android.h" | 20 #include "ui/android/view_android.h" |
20 #endif // OS_ANDROID | 21 #endif // OS_ANDROID |
21 | 22 |
22 namespace cc { | 23 namespace cc { |
23 class CompositorFrameMetadata; | 24 class CompositorFrameMetadata; |
24 } | 25 } |
25 | 26 |
26 #if defined(OS_ANDROID) | 27 #if defined(OS_ANDROID) |
(...skipping 15 matching lines...) Expand all Loading... |
42 : public DevToolsAgentHostImpl, | 43 : public DevToolsAgentHostImpl, |
43 private WebContentsObserver { | 44 private WebContentsObserver { |
44 public: | 45 public: |
45 static void AddAllAgentHosts(DevToolsAgentHost::List* result); | 46 static void AddAllAgentHosts(DevToolsAgentHost::List* result); |
46 | 47 |
47 static void OnCancelPendingNavigation(RenderFrameHost* pending, | 48 static void OnCancelPendingNavigation(RenderFrameHost* pending, |
48 RenderFrameHost* current); | 49 RenderFrameHost* current); |
49 static void OnBeforeNavigation(RenderFrameHost* current, | 50 static void OnBeforeNavigation(RenderFrameHost* current, |
50 RenderFrameHost* pending); | 51 RenderFrameHost* pending); |
51 static void OnBeforeNavigation(NavigationHandle* navigation_handle); | 52 static void OnBeforeNavigation(NavigationHandle* navigation_handle); |
| 53 static void OnFailedNavigation(RenderFrameHost* host, net::Error error_code); |
52 static std::unique_ptr<NavigationThrottle> CreateThrottleForNavigation( | 54 static std::unique_ptr<NavigationThrottle> CreateThrottleForNavigation( |
53 NavigationHandle* navigation_handle); | 55 NavigationHandle* navigation_handle); |
54 static bool IsNetworkHandlerEnabled(FrameTreeNode* frame_tree_node); | 56 static bool IsNetworkHandlerEnabled(FrameTreeNode* frame_tree_node); |
55 static std::string UserAgentOverride(FrameTreeNode* frame_tree_node); | 57 static std::string UserAgentOverride(FrameTreeNode* frame_tree_node); |
56 | 58 |
57 static void WebContentsCreated(WebContents* web_contents); | 59 static void WebContentsCreated(WebContents* web_contents); |
58 | 60 |
59 static void SignalSynchronousSwapCompositorFrame( | 61 static void SignalSynchronousSwapCompositorFrame( |
60 RenderFrameHost* frame_host, | 62 RenderFrameHost* frame_host, |
61 cc::CompositorFrameMetadata frame_metadata); | 63 cc::CompositorFrameMetadata frame_metadata); |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 RenderFrameHost* render_frame_host) override; | 114 RenderFrameHost* render_frame_host) override; |
113 bool OnMessageReceived(const IPC::Message& message) override; | 115 bool OnMessageReceived(const IPC::Message& message) override; |
114 void DidAttachInterstitialPage() override; | 116 void DidAttachInterstitialPage() override; |
115 void DidDetachInterstitialPage() override; | 117 void DidDetachInterstitialPage() override; |
116 void WasShown() override; | 118 void WasShown() override; |
117 void WasHidden() override; | 119 void WasHidden() override; |
118 | 120 |
119 void AboutToNavigateRenderFrame(RenderFrameHost* old_host, | 121 void AboutToNavigateRenderFrame(RenderFrameHost* old_host, |
120 RenderFrameHost* new_host); | 122 RenderFrameHost* new_host); |
121 void AboutToNavigate(NavigationHandle* navigation_handle); | 123 void AboutToNavigate(NavigationHandle* navigation_handle); |
| 124 void OnFailedNavigation(net::Error error_code); |
122 | 125 |
123 void DispatchBufferedProtocolMessagesIfNecessary(); | 126 void DispatchBufferedProtocolMessagesIfNecessary(); |
124 | 127 |
125 void SetPending(RenderFrameHostImpl* host); | 128 void SetPending(RenderFrameHostImpl* host); |
126 void CommitPending(); | 129 void CommitPending(); |
127 void DiscardPending(); | 130 void DiscardPending(); |
128 void UpdateProtocolHandlers(RenderFrameHostImpl* host); | 131 void UpdateProtocolHandlers(RenderFrameHostImpl* host); |
129 | 132 |
130 bool IsChildFrame(); | 133 bool IsChildFrame(); |
131 | 134 |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 | 183 |
181 // The FrameTreeNode associated with this agent. | 184 // The FrameTreeNode associated with this agent. |
182 FrameTreeNode* frame_tree_node_; | 185 FrameTreeNode* frame_tree_node_; |
183 | 186 |
184 DISALLOW_COPY_AND_ASSIGN(RenderFrameDevToolsAgentHost); | 187 DISALLOW_COPY_AND_ASSIGN(RenderFrameDevToolsAgentHost); |
185 }; | 188 }; |
186 | 189 |
187 } // namespace content | 190 } // namespace content |
188 | 191 |
189 #endif // CONTENT_BROWSER_DEVTOOLS_RENDER_FRAME_DEVTOOLS_AGENT_HOST_H_ | 192 #endif // CONTENT_BROWSER_DEVTOOLS_RENDER_FRAME_DEVTOOLS_AGENT_HOST_H_ |
OLD | NEW |