| 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 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 | 186 |
| 187 | 187 |
| 188 DevToolsWindow* DevToolsWindow::Create( | 188 DevToolsWindow* DevToolsWindow::Create( |
| 189 Profile* profile, | 189 Profile* profile, |
| 190 RenderViewHost* inspected_rvh, | 190 RenderViewHost* inspected_rvh, |
| 191 DevToolsDockSide dock_side, | 191 DevToolsDockSide dock_side, |
| 192 bool shared_worker_frontend) { | 192 bool shared_worker_frontend) { |
| 193 // Create WebContents with devtools. | 193 // Create WebContents with devtools. |
| 194 WebContents* web_contents = | 194 WebContents* web_contents = |
| 195 WebContents::Create(WebContents::CreateParams(profile)); | 195 WebContents::Create(WebContents::CreateParams(profile)); |
| 196 web_contents->GetRenderViewHost()->AllowBindings( | |
| 197 content::BINDINGS_POLICY_WEB_UI); | |
| 198 web_contents->GetController().LoadURL( | 196 web_contents->GetController().LoadURL( |
| 199 GetDevToolsUrl(profile, dock_side, shared_worker_frontend), | 197 GetDevToolsUrl(profile, dock_side, shared_worker_frontend), |
| 200 content::Referrer(), | 198 content::Referrer(), |
| 201 content::PAGE_TRANSITION_AUTO_TOPLEVEL, | 199 content::PAGE_TRANSITION_AUTO_TOPLEVEL, |
| 202 std::string()); | 200 std::string()); |
| 203 return new DevToolsWindow(web_contents, profile, inspected_rvh, dock_side); | 201 return new DevToolsWindow(web_contents, profile, inspected_rvh, dock_side); |
| 204 } | 202 } |
| 205 | 203 |
| 206 DevToolsWindow::DevToolsWindow(WebContents* web_contents, | 204 DevToolsWindow::DevToolsWindow(WebContents* web_contents, |
| 207 Profile* profile, | 205 Profile* profile, |
| (...skipping 765 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 973 | 971 |
| 974 // static | 972 // static |
| 975 DevToolsDockSide DevToolsWindow::SideFromString( | 973 DevToolsDockSide DevToolsWindow::SideFromString( |
| 976 const std::string& dock_side) { | 974 const std::string& dock_side) { |
| 977 if (dock_side == kDockSideRight) | 975 if (dock_side == kDockSideRight) |
| 978 return DEVTOOLS_DOCK_SIDE_RIGHT; | 976 return DEVTOOLS_DOCK_SIDE_RIGHT; |
| 979 if (dock_side == kDockSideBottom) | 977 if (dock_side == kDockSideBottom) |
| 980 return DEVTOOLS_DOCK_SIDE_BOTTOM; | 978 return DEVTOOLS_DOCK_SIDE_BOTTOM; |
| 981 return DEVTOOLS_DOCK_SIDE_UNDOCKED; | 979 return DEVTOOLS_DOCK_SIDE_UNDOCKED; |
| 982 } | 980 } |
| OLD | NEW |