| 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 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 } | 169 } |
| 170 | 170 |
| 171 | 171 |
| 172 DevToolsWindow* DevToolsWindow::Create( | 172 DevToolsWindow* DevToolsWindow::Create( |
| 173 Profile* profile, | 173 Profile* profile, |
| 174 RenderViewHost* inspected_rvh, | 174 RenderViewHost* inspected_rvh, |
| 175 bool docked, | 175 bool docked, |
| 176 bool shared_worker_frontend) { | 176 bool shared_worker_frontend) { |
| 177 // Create TabContents with devtools. | 177 // Create TabContents with devtools. |
| 178 TabContents* tab_contents = | 178 TabContents* tab_contents = |
| 179 chrome::TabContentsFactory(profile, NULL, MSG_ROUTING_NONE, NULL, NULL); | 179 chrome::TabContentsFactory(profile, NULL, MSG_ROUTING_NONE, NULL); |
| 180 tab_contents->web_contents()->GetRenderViewHost()->AllowBindings( | 180 tab_contents->web_contents()->GetRenderViewHost()->AllowBindings( |
| 181 content::BINDINGS_POLICY_WEB_UI); | 181 content::BINDINGS_POLICY_WEB_UI); |
| 182 tab_contents->web_contents()->GetController().LoadURL( | 182 tab_contents->web_contents()->GetController().LoadURL( |
| 183 GetDevToolsUrl(profile, docked, shared_worker_frontend), | 183 GetDevToolsUrl(profile, docked, shared_worker_frontend), |
| 184 content::Referrer(), | 184 content::Referrer(), |
| 185 content::PAGE_TRANSITION_START_PAGE, | 185 content::PAGE_TRANSITION_START_PAGE, |
| 186 std::string()); | 186 std::string()); |
| 187 return new DevToolsWindow(tab_contents, profile, inspected_rvh, docked); | 187 return new DevToolsWindow(tab_contents, profile, inspected_rvh, docked); |
| 188 } | 188 } |
| 189 | 189 |
| (...skipping 575 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 765 FileSelectHelper::RunFileChooser(web_contents, params); | 765 FileSelectHelper::RunFileChooser(web_contents, params); |
| 766 } | 766 } |
| 767 | 767 |
| 768 void DevToolsWindow::UpdateBrowserToolbar() { | 768 void DevToolsWindow::UpdateBrowserToolbar() { |
| 769 if (!inspected_tab_) | 769 if (!inspected_tab_) |
| 770 return; | 770 return; |
| 771 BrowserWindow* inspected_window = GetInspectedBrowserWindow(); | 771 BrowserWindow* inspected_window = GetInspectedBrowserWindow(); |
| 772 if (inspected_window) | 772 if (inspected_window) |
| 773 inspected_window->UpdateToolbar(inspected_tab_, false); | 773 inspected_window->UpdateToolbar(inspected_tab_, false); |
| 774 } | 774 } |
| 775 | |
| OLD | NEW |