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

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

Issue 2253683002: [DevTools] Introduce a target discovery preference (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments were addressed. Created 4 years, 4 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/tcp_device_provider.h ('k') | chrome/chrome_tests.gypi » ('j') | 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 356 matching lines...) Expand 10 before | Expand all | Expand 10 after
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->RegisterDictionaryPref(prefs::kDevToolsPreferences); 378 registry->RegisterDictionaryPref(prefs::kDevToolsPreferences);
378 } 379 }
379 380
380 // static 381 // static
381 content::WebContents* DevToolsWindow::GetInTabWebContents( 382 content::WebContents* DevToolsWindow::GetInTabWebContents(
382 WebContents* inspected_web_contents, 383 WebContents* inspected_web_contents,
383 DevToolsContentsResizingStrategy* out_strategy) { 384 DevToolsContentsResizingStrategy* out_strategy) {
384 DevToolsWindow* window = GetInstanceForInspectedWebContents( 385 DevToolsWindow* window = GetInstanceForInspectedWebContents(
385 inspected_web_contents); 386 inspected_web_contents);
386 if (!window || window->life_stage_ == kClosing) 387 if (!window || window->life_stage_ == kClosing)
(...skipping 933 matching lines...) Expand 10 before | Expand all | Expand 10 after
1320 bool DevToolsWindow::ReloadInspectedWebContents(bool bypass_cache) { 1321 bool DevToolsWindow::ReloadInspectedWebContents(bool bypass_cache) {
1321 // Only route reload via front-end if the agent is attached. 1322 // Only route reload via front-end if the agent is attached.
1322 WebContents* wc = GetInspectedWebContents(); 1323 WebContents* wc = GetInspectedWebContents();
1323 if (!wc || wc->GetCrashedStatus() != base::TERMINATION_STATUS_STILL_RUNNING) 1324 if (!wc || wc->GetCrashedStatus() != base::TERMINATION_STATUS_STILL_RUNNING)
1324 return false; 1325 return false;
1325 base::FundamentalValue bypass_cache_value(bypass_cache); 1326 base::FundamentalValue bypass_cache_value(bypass_cache);
1326 bindings_->CallClientFunction("DevToolsAPI.reloadInspectedPage", 1327 bindings_->CallClientFunction("DevToolsAPI.reloadInspectedPage",
1327 &bypass_cache_value, nullptr, nullptr); 1328 &bypass_cache_value, nullptr, nullptr);
1328 return true; 1329 return true;
1329 } 1330 }
OLDNEW
« no previous file with comments | « chrome/browser/devtools/device/tcp_device_provider.h ('k') | chrome/chrome_tests.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698