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

Side by Side Diff: chrome/browser/ui/webui/inspect_ui.cc

Issue 2899783002: Move DevTools out of ash and turn it to a component. (Closed)
Patch Set: add README.md Created 3 years, 6 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/about_flags.cc ('k') | components/BUILD.gn » ('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/ui/webui/inspect_ui.h" 5 #include "chrome/browser/ui/webui/inspect_ui.h"
6 6
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "base/memory/ptr_util.h" 8 #include "base/memory/ptr_util.h"
9 #include "base/metrics/user_metrics.h" 9 #include "base/metrics/user_metrics.h"
10 #include "chrome/browser/devtools/devtools_targets_ui.h" 10 #include "chrome/browser/devtools/devtools_targets_ui.h"
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 61
62 const char kPortForwardingDefaultPort[] = "8080"; 62 const char kPortForwardingDefaultPort[] = "8080";
63 const char kPortForwardingDefaultLocation[] = "localhost:8080"; 63 const char kPortForwardingDefaultLocation[] = "localhost:8080";
64 64
65 const char kNameField[] = "name"; 65 const char kNameField[] = "name";
66 const char kUrlField[] = "url"; 66 const char kUrlField[] = "url";
67 const char kIsAdditionalField[] = "isAdditional"; 67 const char kIsAdditionalField[] = "isAdditional";
68 68
69 void GetUiDevToolsTargets(base::ListValue& targets) { 69 void GetUiDevToolsTargets(base::ListValue& targets) {
70 for (const auto& client_pair : 70 for (const auto& client_pair :
71 ui::devtools::UiDevToolsServer::GetClientNamesAndUrls()) { 71 ui_devtools::UiDevToolsServer::GetClientNamesAndUrls()) {
72 auto target_data = base::MakeUnique<base::DictionaryValue>(); 72 auto target_data = base::MakeUnique<base::DictionaryValue>();
73 target_data->SetString(kNameField, client_pair.first); 73 target_data->SetString(kNameField, client_pair.first);
74 target_data->SetString(kUrlField, client_pair.second); 74 target_data->SetString(kUrlField, client_pair.second);
75 target_data->SetBoolean(kIsAdditionalField, true); 75 target_data->SetBoolean(kIsAdditionalField, true);
76 targets.Append(std::move(target_data)); 76 targets.Append(std::move(target_data));
77 } 77 }
78 } 78 }
79 79
80 // InspectMessageHandler -------------------------------------------- 80 // InspectMessageHandler --------------------------------------------
81 81
(...skipping 544 matching lines...) Expand 10 before | Expand all | Expand 10 after
626 handler->ForceUpdate(); 626 handler->ForceUpdate();
627 } 627 }
628 628
629 void InspectUI::PopulatePortStatus(const base::Value& status) { 629 void InspectUI::PopulatePortStatus(const base::Value& status) {
630 web_ui()->CallJavascriptFunctionUnsafe("populatePortStatus", status); 630 web_ui()->CallJavascriptFunctionUnsafe("populatePortStatus", status);
631 } 631 }
632 632
633 void InspectUI::ShowIncognitoWarning() { 633 void InspectUI::ShowIncognitoWarning() {
634 web_ui()->CallJavascriptFunctionUnsafe("showIncognitoWarning"); 634 web_ui()->CallJavascriptFunctionUnsafe("showIncognitoWarning");
635 } 635 }
OLDNEW
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | components/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698