OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <algorithm> | 5 #include <algorithm> |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/json/json_writer.h" | 8 #include "base/json/json_writer.h" |
9 #include "base/lazy_instance.h" | 9 #include "base/lazy_instance.h" |
10 #include "base/string_number_conversions.h" | 10 #include "base/string_number_conversions.h" |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 } | 161 } |
162 | 162 |
163 | 163 |
164 DevToolsWindow* DevToolsWindow::Create( | 164 DevToolsWindow* DevToolsWindow::Create( |
165 Profile* profile, | 165 Profile* profile, |
166 RenderViewHost* inspected_rvh, | 166 RenderViewHost* inspected_rvh, |
167 bool docked, | 167 bool docked, |
168 bool shared_worker_frontend) { | 168 bool shared_worker_frontend) { |
169 // Create TabContents with devtools. | 169 // Create TabContents with devtools. |
170 TabContents* tab_contents = | 170 TabContents* tab_contents = |
171 chrome::TabContentsFactory(profile, NULL, MSG_ROUTING_NONE, NULL, NULL); | 171 chrome::TabContentsFactory(profile, NULL, MSG_ROUTING_NONE, NULL); |
172 tab_contents->web_contents()->GetRenderViewHost()->AllowBindings( | 172 tab_contents->web_contents()->GetRenderViewHost()->AllowBindings( |
173 content::BINDINGS_POLICY_WEB_UI); | 173 content::BINDINGS_POLICY_WEB_UI); |
174 tab_contents->web_contents()->GetController().LoadURL( | 174 tab_contents->web_contents()->GetController().LoadURL( |
175 GetDevToolsUrl(profile, docked, shared_worker_frontend), | 175 GetDevToolsUrl(profile, docked, shared_worker_frontend), |
176 content::Referrer(), | 176 content::Referrer(), |
177 content::PAGE_TRANSITION_START_PAGE, | 177 content::PAGE_TRANSITION_START_PAGE, |
178 std::string()); | 178 std::string()); |
179 return new DevToolsWindow(tab_contents, profile, inspected_rvh, docked); | 179 return new DevToolsWindow(tab_contents, profile, inspected_rvh, docked); |
180 } | 180 } |
181 | 181 |
(...skipping 581 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
763 return inspected_tab_->web_contents()->GetDelegate()-> | 763 return inspected_tab_->web_contents()->GetDelegate()-> |
764 GetJavaScriptDialogCreator(); | 764 GetJavaScriptDialogCreator(); |
765 } | 765 } |
766 return content::WebContentsDelegate::GetJavaScriptDialogCreator(); | 766 return content::WebContentsDelegate::GetJavaScriptDialogCreator(); |
767 } | 767 } |
768 | 768 |
769 void DevToolsWindow::RunFileChooser(WebContents* web_contents, | 769 void DevToolsWindow::RunFileChooser(WebContents* web_contents, |
770 const FileChooserParams& params) { | 770 const FileChooserParams& params) { |
771 FileSelectHelper::RunFileChooser(web_contents, params); | 771 FileSelectHelper::RunFileChooser(web_contents, params); |
772 } | 772 } |
773 | |
OLD | NEW |