| 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/json/json_writer.h" | 9 #include "base/json/json_writer.h" |
| 10 #include "base/strings/string_number_conversions.h" | 10 #include "base/strings/string_number_conversions.h" |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 devtools_http_handler::DevToolsHttpHandler* http_handler = | 110 devtools_http_handler::DevToolsHttpHandler* http_handler = |
| 111 ShellContentBrowserClient::Get() | 111 ShellContentBrowserClient::Get() |
| 112 ->shell_browser_main_parts() | 112 ->shell_browser_main_parts() |
| 113 ->devtools_http_handler(); | 113 ->devtools_http_handler(); |
| 114 shell->LoadURL(http_handler->GetFrontendURL("/devtools/devtools.html")); | 114 shell->LoadURL(http_handler->GetFrontendURL("/devtools/devtools.html")); |
| 115 | 115 |
| 116 return devtools_frontend; | 116 return devtools_frontend; |
| 117 } | 117 } |
| 118 | 118 |
| 119 void ShellDevToolsFrontend::Activate() { | 119 void ShellDevToolsFrontend::Activate() { |
| 120 frontend_shell_->ActivateContents(web_contents()); | 120 frontend_shell_->ActivateContents(web_contents(), true /* user_gesture */); |
| 121 } | 121 } |
| 122 | 122 |
| 123 void ShellDevToolsFrontend::Focus() { | 123 void ShellDevToolsFrontend::Focus() { |
| 124 web_contents()->Focus(); | 124 web_contents()->Focus(); |
| 125 } | 125 } |
| 126 | 126 |
| 127 void ShellDevToolsFrontend::InspectElementAt(int x, int y) { | 127 void ShellDevToolsFrontend::InspectElementAt(int x, int y) { |
| 128 if (agent_host_) | 128 if (agent_host_) |
| 129 agent_host_->InspectElement(x, y); | 129 agent_host_->InspectElement(x, y); |
| 130 } | 130 } |
| (...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 330 CallClientFunction("DevToolsAPI.embedderMessageAck", | 330 CallClientFunction("DevToolsAPI.embedderMessageAck", |
| 331 &id_value, arg, nullptr); | 331 &id_value, arg, nullptr); |
| 332 } | 332 } |
| 333 | 333 |
| 334 void ShellDevToolsFrontend::AgentHostClosed( | 334 void ShellDevToolsFrontend::AgentHostClosed( |
| 335 DevToolsAgentHost* agent_host, bool replaced) { | 335 DevToolsAgentHost* agent_host, bool replaced) { |
| 336 frontend_shell_->Close(); | 336 frontend_shell_->Close(); |
| 337 } | 337 } |
| 338 | 338 |
| 339 } // namespace content | 339 } // namespace content |
| OLD | NEW |