OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/stringprintf.h" | 10 #include "base/stringprintf.h" |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 RenderViewHost* inspected_rvh, | 156 RenderViewHost* inspected_rvh, |
157 bool docked, | 157 bool docked, |
158 bool shared_worker_frontend) { | 158 bool shared_worker_frontend) { |
159 // Create TabContents with devtools. | 159 // Create TabContents with devtools. |
160 TabContentsWrapper* tab_contents = | 160 TabContentsWrapper* tab_contents = |
161 Browser::TabContentsFactory(profile, NULL, MSG_ROUTING_NONE, NULL, NULL); | 161 Browser::TabContentsFactory(profile, NULL, MSG_ROUTING_NONE, NULL, NULL); |
162 tab_contents->render_view_host()->AllowBindings( | 162 tab_contents->render_view_host()->AllowBindings( |
163 content::BINDINGS_POLICY_WEB_UI); | 163 content::BINDINGS_POLICY_WEB_UI); |
164 tab_contents->controller().LoadURL( | 164 tab_contents->controller().LoadURL( |
165 GetDevToolsUrl(profile, docked, shared_worker_frontend), | 165 GetDevToolsUrl(profile, docked, shared_worker_frontend), |
166 GURL(), | 166 content::Referrer(), |
167 content::PAGE_TRANSITION_START_PAGE, | 167 content::PAGE_TRANSITION_START_PAGE, |
168 std::string()); | 168 std::string()); |
169 return new DevToolsWindow(tab_contents, profile, inspected_rvh, docked); | 169 return new DevToolsWindow(tab_contents, profile, inspected_rvh, docked); |
170 } | 170 } |
171 | 171 |
172 DevToolsWindow::DevToolsWindow(TabContentsWrapper* tab_contents, | 172 DevToolsWindow::DevToolsWindow(TabContentsWrapper* tab_contents, |
173 Profile* profile, | 173 Profile* profile, |
174 RenderViewHost* inspected_rvh, | 174 RenderViewHost* inspected_rvh, |
175 bool docked) | 175 bool docked) |
176 : profile_(profile), | 176 : profile_(profile), |
(...skipping 494 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
671 content); | 671 content); |
672 } | 672 } |
673 | 673 |
674 content::JavaScriptDialogCreator* DevToolsWindow::GetJavaScriptDialogCreator() { | 674 content::JavaScriptDialogCreator* DevToolsWindow::GetJavaScriptDialogCreator() { |
675 if (inspected_tab_ && inspected_tab_->tab_contents()->delegate()) { | 675 if (inspected_tab_ && inspected_tab_->tab_contents()->delegate()) { |
676 return inspected_tab_->tab_contents()->delegate()-> | 676 return inspected_tab_->tab_contents()->delegate()-> |
677 GetJavaScriptDialogCreator(); | 677 GetJavaScriptDialogCreator(); |
678 } | 678 } |
679 return TabContentsDelegate::GetJavaScriptDialogCreator(); | 679 return TabContentsDelegate::GetJavaScriptDialogCreator(); |
680 } | 680 } |
OLD | NEW |