Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(120)

Side by Side Diff: chrome/browser/devtools/devtools_window.cc

Issue 2301323004: [DevTools] Enable TCP targets discovery by default (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/browser/devtools/device/devtools_android_bridge_browsertest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 358 matching lines...) Expand 10 before | Expand all | Expand 10 after
369 registry->RegisterDictionaryPref(prefs::kDevToolsFileSystemPaths); 369 registry->RegisterDictionaryPref(prefs::kDevToolsFileSystemPaths);
370 registry->RegisterStringPref(prefs::kDevToolsAdbKey, std::string()); 370 registry->RegisterStringPref(prefs::kDevToolsAdbKey, std::string());
371 371
372 registry->RegisterBooleanPref(prefs::kDevToolsDiscoverUsbDevicesEnabled, 372 registry->RegisterBooleanPref(prefs::kDevToolsDiscoverUsbDevicesEnabled,
373 true); 373 true);
374 registry->RegisterBooleanPref(prefs::kDevToolsPortForwardingEnabled, false); 374 registry->RegisterBooleanPref(prefs::kDevToolsPortForwardingEnabled, false);
375 registry->RegisterBooleanPref(prefs::kDevToolsPortForwardingDefaultSet, 375 registry->RegisterBooleanPref(prefs::kDevToolsPortForwardingDefaultSet,
376 false); 376 false);
377 registry->RegisterDictionaryPref(prefs::kDevToolsPortForwardingConfig); 377 registry->RegisterDictionaryPref(prefs::kDevToolsPortForwardingConfig);
378 registry->RegisterBooleanPref(prefs::kDevToolsDiscoverTCPTargetsEnabled, 378 registry->RegisterBooleanPref(prefs::kDevToolsDiscoverTCPTargetsEnabled,
379 false); 379 true);
380 registry->RegisterListPref(prefs::kDevToolsTCPDiscoveryConfig); 380 registry->RegisterListPref(prefs::kDevToolsTCPDiscoveryConfig);
381 registry->RegisterDictionaryPref(prefs::kDevToolsPreferences); 381 registry->RegisterDictionaryPref(prefs::kDevToolsPreferences);
382 } 382 }
383 383
384 // static 384 // static
385 content::WebContents* DevToolsWindow::GetInTabWebContents( 385 content::WebContents* DevToolsWindow::GetInTabWebContents(
386 WebContents* inspected_web_contents, 386 WebContents* inspected_web_contents,
387 DevToolsContentsResizingStrategy* out_strategy) { 387 DevToolsContentsResizingStrategy* out_strategy) {
388 DevToolsWindow* window = GetInstanceForInspectedWebContents( 388 DevToolsWindow* window = GetInstanceForInspectedWebContents(
389 inspected_web_contents); 389 inspected_web_contents);
(...skipping 930 matching lines...) Expand 10 before | Expand all | Expand 10 after
1320 bool DevToolsWindow::ReloadInspectedWebContents(bool bypass_cache) { 1320 bool DevToolsWindow::ReloadInspectedWebContents(bool bypass_cache) {
1321 // Only route reload via front-end if the agent is attached. 1321 // Only route reload via front-end if the agent is attached.
1322 WebContents* wc = GetInspectedWebContents(); 1322 WebContents* wc = GetInspectedWebContents();
1323 if (!wc || wc->GetCrashedStatus() != base::TERMINATION_STATUS_STILL_RUNNING) 1323 if (!wc || wc->GetCrashedStatus() != base::TERMINATION_STATUS_STILL_RUNNING)
1324 return false; 1324 return false;
1325 base::FundamentalValue bypass_cache_value(bypass_cache); 1325 base::FundamentalValue bypass_cache_value(bypass_cache);
1326 bindings_->CallClientFunction("DevToolsAPI.reloadInspectedPage", 1326 bindings_->CallClientFunction("DevToolsAPI.reloadInspectedPage",
1327 &bypass_cache_value, nullptr, nullptr); 1327 &bypass_cache_value, nullptr, nullptr);
1328 return true; 1328 return true;
1329 } 1329 }
OLDNEW
« no previous file with comments | « chrome/browser/devtools/device/devtools_android_bridge_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698