| 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 "content/shell/browser/shell_devtools_frontend.h" | 5 #include "content/shell/browser/shell_devtools_frontend.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/json/json_reader.h" | 8 #include "base/json/json_reader.h" |
| 9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
| 10 #include "base/strings/string_number_conversions.h" | 10 #include "base/strings/string_number_conversions.h" |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 WebContents* inspected_contents) { | 59 WebContents* inspected_contents) { |
| 60 return ShellDevToolsFrontend::Show(inspected_contents, "", ""); | 60 return ShellDevToolsFrontend::Show(inspected_contents, "", ""); |
| 61 } | 61 } |
| 62 | 62 |
| 63 // static | 63 // static |
| 64 ShellDevToolsFrontend* ShellDevToolsFrontend::Show( | 64 ShellDevToolsFrontend* ShellDevToolsFrontend::Show( |
| 65 WebContents* inspected_contents, | 65 WebContents* inspected_contents, |
| 66 const std::string& settings, | 66 const std::string& settings, |
| 67 const std::string& frontend_url) { | 67 const std::string& frontend_url) { |
| 68 scoped_refptr<DevToolsAgentHost> agent( | 68 scoped_refptr<DevToolsAgentHost> agent( |
| 69 DevToolsAgentHost::GetOrCreateFor( | 69 DevToolsAgentHost::GetOrCreateFor(inspected_contents)); |
| 70 inspected_contents->GetRenderViewHost())); | |
| 71 Shell* shell = Shell::CreateNewWindow(inspected_contents->GetBrowserContext(), | 70 Shell* shell = Shell::CreateNewWindow(inspected_contents->GetBrowserContext(), |
| 72 GURL(), | 71 GURL(), |
| 73 NULL, | 72 NULL, |
| 74 MSG_ROUTING_NONE, | 73 MSG_ROUTING_NONE, |
| 75 gfx::Size()); | 74 gfx::Size()); |
| 76 ShellDevToolsFrontend* devtools_frontend = new ShellDevToolsFrontend( | 75 ShellDevToolsFrontend* devtools_frontend = new ShellDevToolsFrontend( |
| 77 shell, | 76 shell, |
| 78 agent.get()); | 77 agent.get()); |
| 79 | 78 |
| 80 ShellDevToolsDelegate* delegate = ShellContentBrowserClient::Get()-> | 79 ShellDevToolsDelegate* delegate = ShellContentBrowserClient::Get()-> |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 const std::string& message) { | 180 const std::string& message) { |
| 182 if (frontend_host_) | 181 if (frontend_host_) |
| 183 frontend_host_->DispatchOnDevToolsFrontend(message); | 182 frontend_host_->DispatchOnDevToolsFrontend(message); |
| 184 } | 183 } |
| 185 | 184 |
| 186 void ShellDevToolsFrontend::InspectedContentsClosing() { | 185 void ShellDevToolsFrontend::InspectedContentsClosing() { |
| 187 frontend_shell_->Close(); | 186 frontend_shell_->Close(); |
| 188 } | 187 } |
| 189 | 188 |
| 190 } // namespace content | 189 } // namespace content |
| OLD | NEW |