| 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) |
| 27 namespace device { | 28 namespace device { |
| 28 class PowerSaveBlocker; | 29 class PowerSaveBlocker; |
| 29 } // namespace device | 30 } // namespace device |
| 30 #endif | 31 #endif |
| 31 | 32 |
| 32 namespace content { | 33 namespace content { |
| 33 | 34 |
| 34 class BrowserContext; | 35 class BrowserContext; |
| 35 class DevToolsFrameTraceRecorder; | 36 class DevToolsFrameTraceRecorder; |
| 36 class FrameTreeNode; | 37 class FrameTreeNode; |
| 37 class NavigationHandle; | 38 class NavigationHandle; |
| 38 class NavigationThrottle; | 39 class NavigationThrottle; |
| 39 class RenderFrameHostImpl; | 40 class RenderFrameHostImpl; |
| 41 struct BeginNavigationParams; |
| 42 struct CommonNavigationParams; |
| 40 | 43 |
| 41 class CONTENT_EXPORT RenderFrameDevToolsAgentHost | 44 class CONTENT_EXPORT RenderFrameDevToolsAgentHost |
| 42 : public DevToolsAgentHostImpl, | 45 : public DevToolsAgentHostImpl, |
| 43 private WebContentsObserver { | 46 private WebContentsObserver { |
| 44 public: | 47 public: |
| 45 static void AddAllAgentHosts(DevToolsAgentHost::List* result); | 48 static void AddAllAgentHosts(DevToolsAgentHost::List* result); |
| 46 | 49 |
| 47 static void OnCancelPendingNavigation(RenderFrameHost* pending, | 50 static void OnCancelPendingNavigation(RenderFrameHost* pending, |
| 48 RenderFrameHost* current); | 51 RenderFrameHost* current); |
| 49 static void OnBeforeNavigation(RenderFrameHost* current, | 52 static void OnBeforeNavigation(RenderFrameHost* current, |
| 50 RenderFrameHost* pending); | 53 RenderFrameHost* pending); |
| 51 static void OnBeforeNavigation(NavigationHandle* navigation_handle); | 54 static void OnBeforeNavigation(NavigationHandle* navigation_handle); |
| 55 static void OnFailedNavigation(RenderFrameHost* host, |
| 56 const CommonNavigationParams& common_params, |
| 57 const BeginNavigationParams& begin_params, |
| 58 net::Error error_code); |
| 52 static std::unique_ptr<NavigationThrottle> CreateThrottleForNavigation( | 59 static std::unique_ptr<NavigationThrottle> CreateThrottleForNavigation( |
| 53 NavigationHandle* navigation_handle); | 60 NavigationHandle* navigation_handle); |
| 54 static bool IsNetworkHandlerEnabled(FrameTreeNode* frame_tree_node); | 61 static bool IsNetworkHandlerEnabled(FrameTreeNode* frame_tree_node); |
| 55 static std::string UserAgentOverride(FrameTreeNode* frame_tree_node); | 62 static std::string UserAgentOverride(FrameTreeNode* frame_tree_node); |
| 56 | 63 |
| 57 static void WebContentsCreated(WebContents* web_contents); | 64 static void WebContentsCreated(WebContents* web_contents); |
| 58 | 65 |
| 59 static void SignalSynchronousSwapCompositorFrame( | 66 static void SignalSynchronousSwapCompositorFrame( |
| 60 RenderFrameHost* frame_host, | 67 RenderFrameHost* frame_host, |
| 61 cc::CompositorFrameMetadata frame_metadata); | 68 cc::CompositorFrameMetadata frame_metadata); |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 RenderFrameHost* render_frame_host) override; | 119 RenderFrameHost* render_frame_host) override; |
| 113 bool OnMessageReceived(const IPC::Message& message) override; | 120 bool OnMessageReceived(const IPC::Message& message) override; |
| 114 void DidAttachInterstitialPage() override; | 121 void DidAttachInterstitialPage() override; |
| 115 void DidDetachInterstitialPage() override; | 122 void DidDetachInterstitialPage() override; |
| 116 void WasShown() override; | 123 void WasShown() override; |
| 117 void WasHidden() override; | 124 void WasHidden() override; |
| 118 | 125 |
| 119 void AboutToNavigateRenderFrame(RenderFrameHost* old_host, | 126 void AboutToNavigateRenderFrame(RenderFrameHost* old_host, |
| 120 RenderFrameHost* new_host); | 127 RenderFrameHost* new_host); |
| 121 void AboutToNavigate(NavigationHandle* navigation_handle); | 128 void AboutToNavigate(NavigationHandle* navigation_handle); |
| 129 void OnFailedNavigation(const CommonNavigationParams& common_params, |
| 130 const BeginNavigationParams& begin_params, |
| 131 net::Error error_code); |
| 122 | 132 |
| 123 void DispatchBufferedProtocolMessagesIfNecessary(); | 133 void DispatchBufferedProtocolMessagesIfNecessary(); |
| 124 | 134 |
| 125 void SetPending(RenderFrameHostImpl* host); | 135 void SetPending(RenderFrameHostImpl* host); |
| 126 void CommitPending(); | 136 void CommitPending(); |
| 127 void DiscardPending(); | 137 void DiscardPending(); |
| 128 void UpdateProtocolHandlers(RenderFrameHostImpl* host); | 138 void UpdateProtocolHandlers(RenderFrameHostImpl* host); |
| 129 | 139 |
| 130 bool IsChildFrame(); | 140 bool IsChildFrame(); |
| 131 | 141 |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 180 | 190 |
| 181 // The FrameTreeNode associated with this agent. | 191 // The FrameTreeNode associated with this agent. |
| 182 FrameTreeNode* frame_tree_node_; | 192 FrameTreeNode* frame_tree_node_; |
| 183 | 193 |
| 184 DISALLOW_COPY_AND_ASSIGN(RenderFrameDevToolsAgentHost); | 194 DISALLOW_COPY_AND_ASSIGN(RenderFrameDevToolsAgentHost); |
| 185 }; | 195 }; |
| 186 | 196 |
| 187 } // namespace content | 197 } // namespace content |
| 188 | 198 |
| 189 #endif // CONTENT_BROWSER_DEVTOOLS_RENDER_FRAME_DEVTOOLS_AGENT_HOST_H_ | 199 #endif // CONTENT_BROWSER_DEVTOOLS_RENDER_FRAME_DEVTOOLS_AGENT_HOST_H_ |
| OLD | NEW |