| 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 "chrome/browser/devtools/devtools_window.h" | 5 #include "chrome/browser/devtools/devtools_window.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/json/json_reader.h" | 10 #include "base/json/json_reader.h" |
| (...skipping 1073 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1084 | 1084 |
| 1085 Show(DevToolsToggleAction::Show()); | 1085 Show(DevToolsToggleAction::Show()); |
| 1086 } | 1086 } |
| 1087 | 1087 |
| 1088 void DevToolsWindow::OpenInNewTab(const std::string& url) { | 1088 void DevToolsWindow::OpenInNewTab(const std::string& url) { |
| 1089 content::OpenURLParams params( | 1089 content::OpenURLParams params( |
| 1090 GURL(url), content::Referrer(), NEW_FOREGROUND_TAB, | 1090 GURL(url), content::Referrer(), NEW_FOREGROUND_TAB, |
| 1091 ui::PAGE_TRANSITION_LINK, false); | 1091 ui::PAGE_TRANSITION_LINK, false); |
| 1092 WebContents* inspected_web_contents = GetInspectedWebContents(); | 1092 WebContents* inspected_web_contents = GetInspectedWebContents(); |
| 1093 if (!inspected_web_contents || !inspected_web_contents->OpenURL(params)) { | 1093 if (!inspected_web_contents || !inspected_web_contents->OpenURL(params)) { |
| 1094 chrome::HostDesktopType host_desktop_type = | 1094 ui::HostDesktopType host_desktop_type = |
| 1095 browser_ ? browser_->host_desktop_type() : chrome::GetActiveDesktop(); | 1095 browser_ ? browser_->host_desktop_type() : chrome::GetActiveDesktop(); |
| 1096 | 1096 |
| 1097 chrome::ScopedTabbedBrowserDisplayer displayer(profile_, host_desktop_type); | 1097 chrome::ScopedTabbedBrowserDisplayer displayer(profile_, host_desktop_type); |
| 1098 chrome::AddSelectedTabWithURL(displayer.browser(), GURL(url), | 1098 chrome::AddSelectedTabWithURL(displayer.browser(), GURL(url), |
| 1099 ui::PAGE_TRANSITION_LINK); | 1099 ui::PAGE_TRANSITION_LINK); |
| 1100 } | 1100 } |
| 1101 } | 1101 } |
| 1102 | 1102 |
| 1103 void DevToolsWindow::SetWhitelistedShortcuts( | 1103 void DevToolsWindow::SetWhitelistedShortcuts( |
| 1104 const std::string& message) { | 1104 const std::string& message) { |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1261 bool DevToolsWindow::ForwardKeyboardEvent( | 1261 bool DevToolsWindow::ForwardKeyboardEvent( |
| 1262 const content::NativeWebKeyboardEvent& event) { | 1262 const content::NativeWebKeyboardEvent& event) { |
| 1263 return event_forwarder_->ForwardEvent(event); | 1263 return event_forwarder_->ForwardEvent(event); |
| 1264 } | 1264 } |
| 1265 | 1265 |
| 1266 void DevToolsWindow::ReloadInspectedWebContents(bool ignore_cache) { | 1266 void DevToolsWindow::ReloadInspectedWebContents(bool ignore_cache) { |
| 1267 base::FundamentalValue ignore_cache_value(ignore_cache); | 1267 base::FundamentalValue ignore_cache_value(ignore_cache); |
| 1268 bindings_->CallClientFunction("DevToolsAPI.reloadInspectedPage", | 1268 bindings_->CallClientFunction("DevToolsAPI.reloadInspectedPage", |
| 1269 &ignore_cache_value, nullptr, nullptr); | 1269 &ignore_cache_value, nullptr, nullptr); |
| 1270 } | 1270 } |
| OLD | NEW |