| 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 356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 367 registry->RegisterDictionaryPref(prefs::kDevToolsEditedFiles); | 367 registry->RegisterDictionaryPref(prefs::kDevToolsEditedFiles); |
| 368 registry->RegisterDictionaryPref(prefs::kDevToolsFileSystemPaths); | 368 registry->RegisterDictionaryPref(prefs::kDevToolsFileSystemPaths); |
| 369 registry->RegisterStringPref(prefs::kDevToolsAdbKey, std::string()); | 369 registry->RegisterStringPref(prefs::kDevToolsAdbKey, std::string()); |
| 370 | 370 |
| 371 registry->RegisterBooleanPref(prefs::kDevToolsDiscoverUsbDevicesEnabled, | 371 registry->RegisterBooleanPref(prefs::kDevToolsDiscoverUsbDevicesEnabled, |
| 372 true); | 372 true); |
| 373 registry->RegisterBooleanPref(prefs::kDevToolsPortForwardingEnabled, false); | 373 registry->RegisterBooleanPref(prefs::kDevToolsPortForwardingEnabled, false); |
| 374 registry->RegisterBooleanPref(prefs::kDevToolsPortForwardingDefaultSet, | 374 registry->RegisterBooleanPref(prefs::kDevToolsPortForwardingDefaultSet, |
| 375 false); | 375 false); |
| 376 registry->RegisterDictionaryPref(prefs::kDevToolsPortForwardingConfig); | 376 registry->RegisterDictionaryPref(prefs::kDevToolsPortForwardingConfig); |
| 377 registry->RegisterListPref(prefs::kDevToolsTargetDiscoveryConfig); | 377 registry->RegisterBooleanPref(prefs::kDevToolsDiscoverTCPTargetsEnabled, |
| 378 false); |
| 379 registry->RegisterListPref(prefs::kDevToolsTCPDiscoveryConfig); |
| 378 registry->RegisterDictionaryPref(prefs::kDevToolsPreferences); | 380 registry->RegisterDictionaryPref(prefs::kDevToolsPreferences); |
| 379 } | 381 } |
| 380 | 382 |
| 381 // static | 383 // static |
| 382 content::WebContents* DevToolsWindow::GetInTabWebContents( | 384 content::WebContents* DevToolsWindow::GetInTabWebContents( |
| 383 WebContents* inspected_web_contents, | 385 WebContents* inspected_web_contents, |
| 384 DevToolsContentsResizingStrategy* out_strategy) { | 386 DevToolsContentsResizingStrategy* out_strategy) { |
| 385 DevToolsWindow* window = GetInstanceForInspectedWebContents( | 387 DevToolsWindow* window = GetInstanceForInspectedWebContents( |
| 386 inspected_web_contents); | 388 inspected_web_contents); |
| 387 if (!window || window->life_stage_ == kClosing) | 389 if (!window || window->life_stage_ == kClosing) |
| (...skipping 933 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1321 bool DevToolsWindow::ReloadInspectedWebContents(bool bypass_cache) { | 1323 bool DevToolsWindow::ReloadInspectedWebContents(bool bypass_cache) { |
| 1322 // Only route reload via front-end if the agent is attached. | 1324 // Only route reload via front-end if the agent is attached. |
| 1323 WebContents* wc = GetInspectedWebContents(); | 1325 WebContents* wc = GetInspectedWebContents(); |
| 1324 if (!wc || wc->GetCrashedStatus() != base::TERMINATION_STATUS_STILL_RUNNING) | 1326 if (!wc || wc->GetCrashedStatus() != base::TERMINATION_STATUS_STILL_RUNNING) |
| 1325 return false; | 1327 return false; |
| 1326 base::FundamentalValue bypass_cache_value(bypass_cache); | 1328 base::FundamentalValue bypass_cache_value(bypass_cache); |
| 1327 bindings_->CallClientFunction("DevToolsAPI.reloadInspectedPage", | 1329 bindings_->CallClientFunction("DevToolsAPI.reloadInspectedPage", |
| 1328 &bypass_cache_value, nullptr, nullptr); | 1330 &bypass_cache_value, nullptr, nullptr); |
| 1329 return true; | 1331 return true; |
| 1330 } | 1332 } |
| OLD | NEW |