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