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/path_service.h" | 8 #include "base/path_service.h" |
9 #include "base/strings/stringprintf.h" | 9 #include "base/strings/stringprintf.h" |
10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 DevToolsManager* manager = DevToolsManager::GetInstance(); | 119 DevToolsManager* manager = DevToolsManager::GetInstance(); |
120 manager->RegisterDevToolsClientHostFor(agent_host_.get(), | 120 manager->RegisterDevToolsClientHostFor(agent_host_.get(), |
121 frontend_host_.get()); | 121 frontend_host_.get()); |
122 } | 122 } |
123 | 123 |
124 void ShellDevToolsFrontend::DocumentOnLoadCompletedInMainFrame() { | 124 void ShellDevToolsFrontend::DocumentOnLoadCompletedInMainFrame() { |
125 web_contents()->GetMainFrame()->ExecuteJavaScript( | 125 web_contents()->GetMainFrame()->ExecuteJavaScript( |
126 base::ASCIIToUTF16("InspectorFrontendAPI.setUseSoftMenu(true);")); | 126 base::ASCIIToUTF16("InspectorFrontendAPI.setUseSoftMenu(true);")); |
127 } | 127 } |
128 | 128 |
129 void ShellDevToolsFrontend::WebContentsDestroyed(WebContents* web_contents) { | 129 void ShellDevToolsFrontend::WebContentsDestroyed() { |
130 DevToolsManager::GetInstance()->ClientHostClosing(frontend_host_.get()); | 130 DevToolsManager::GetInstance()->ClientHostClosing(frontend_host_.get()); |
131 delete this; | 131 delete this; |
132 } | 132 } |
133 | 133 |
134 void ShellDevToolsFrontend::InspectedContentsClosing() { | 134 void ShellDevToolsFrontend::InspectedContentsClosing() { |
135 frontend_shell_->Close(); | 135 frontend_shell_->Close(); |
136 } | 136 } |
137 | 137 |
138 } // namespace content | 138 } // namespace content |
OLD | NEW |