| 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 #include "android_webview/browser/aw_devtools_manager_delegate.h" | 5 #include "android_webview/browser/aw_devtools_manager_delegate.h" |
| 6 | 6 |
| 7 #include "android_webview/browser/browser_view_renderer.h" | 7 #include "android_webview/browser/browser_view_renderer.h" |
| 8 #include "android_webview/common/aw_content_client.h" | 8 #include "android_webview/common/aw_content_client.h" |
| 9 #include "base/json/json_writer.h" | 9 #include "base/json/json_writer.h" |
| 10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 AwDevToolsManagerDelegate::~AwDevToolsManagerDelegate() { | 26 AwDevToolsManagerDelegate::~AwDevToolsManagerDelegate() { |
| 27 } | 27 } |
| 28 | 28 |
| 29 void AwDevToolsManagerDelegate::Inspect(DevToolsAgentHost* agent_host) { | 29 void AwDevToolsManagerDelegate::Inspect(DevToolsAgentHost* agent_host) { |
| 30 } | 30 } |
| 31 | 31 |
| 32 void AwDevToolsManagerDelegate::DevToolsAgentStateChanged( | 32 void AwDevToolsManagerDelegate::DevToolsAgentStateChanged( |
| 33 DevToolsAgentHost* agent_host, bool attached) { | 33 DevToolsAgentHost* agent_host, bool attached) { |
| 34 } | 34 } |
| 35 | 35 |
| 36 std::string AwDevToolsManagerDelegate::GetTargetType(RenderFrameHost* host) { | |
| 37 return "webview"; | |
| 38 } | |
| 39 | |
| 40 std::string AwDevToolsManagerDelegate::GetTargetDescription( | 36 std::string AwDevToolsManagerDelegate::GetTargetDescription( |
| 41 RenderFrameHost* host) { | 37 RenderFrameHost* host) { |
| 42 content::WebContents* web_contents = | 38 content::WebContents* web_contents = |
| 43 content::WebContents::FromRenderFrameHost(host); | 39 content::WebContents::FromRenderFrameHost(host); |
| 44 android_webview::BrowserViewRenderer* bvr = | 40 android_webview::BrowserViewRenderer* bvr = |
| 45 android_webview::BrowserViewRenderer::FromWebContents(web_contents); | 41 android_webview::BrowserViewRenderer::FromWebContents(web_contents); |
| 46 if (!bvr) | 42 if (!bvr) |
| 47 return ""; | 43 return ""; |
| 48 base::DictionaryValue description; | 44 base::DictionaryValue description; |
| 49 description.SetBoolean("attached", bvr->attached_to_window()); | 45 description.SetBoolean("attached", bvr->attached_to_window()); |
| (...skipping 15 matching lines...) Expand all Loading... |
| 65 const char html[] = | 61 const char html[] = |
| 66 "<html>" | 62 "<html>" |
| 67 "<head><title>WebView remote debugging</title></head>" | 63 "<head><title>WebView remote debugging</title></head>" |
| 68 "<body>Please use <a href=\'chrome://inspect\'>chrome://inspect</a>" | 64 "<body>Please use <a href=\'chrome://inspect\'>chrome://inspect</a>" |
| 69 "</body>" | 65 "</body>" |
| 70 "</html>"; | 66 "</html>"; |
| 71 return html; | 67 return html; |
| 72 } | 68 } |
| 73 | 69 |
| 74 } // namespace android_webview | 70 } // namespace android_webview |
| OLD | NEW |