Commit cf6cc065 authored by Illia Martyniuk's avatar Illia Martyniuk Committed by Commit Bot

DevTools: Moving enable flag to browser

Moving enable-ui-devtools flag to the browser, so now DevTools
won't carry any host specific information.

Bug: 816802
Change-Id: I9830227660d31803226d8ec469f75f2ce6007712
Reviewed-on: https://chromium-review.googlesource.com/962360Reviewed-by: default avatarSadrul Chowdhury <sadrul@chromium.org>
Reviewed-by: default avatarMichael Wasserman <msw@chromium.org>
Commit-Queue: Illia Martyniuk <illiam@google.com>
Cr-Commit-Position: refs/heads/master@{#543182}
parent 94becc73
......@@ -140,7 +140,6 @@
#include "ash/public/cpp/ash_switches.h"
#include "chromeos/chromeos_switches.h"
#include "components/arc/arc_features.h"
#include "components/ui_devtools/switches.h"
#include "third_party/cros_system_api/switches/chrome_switches.h"
#endif // OS_CHROMEOS
......@@ -2916,9 +2915,9 @@ const FeatureEntry kFeatureEntries[] = {
#endif // OS_ANDROID
#if defined(OS_CHROMEOS)
{ui_devtools::kEnableUiDevTools, flag_descriptions::kUiDevToolsName,
{switches::kEnableUiDevTools, flag_descriptions::kUiDevToolsName,
flag_descriptions::kUiDevToolsDescription, kOsCrOS,
SINGLE_VALUE_TYPE(ui_devtools::kEnableUiDevTools)},
SINGLE_VALUE_TYPE(switches::kEnableUiDevTools)},
#endif // defined(OS_CHROMEOS)
{"enable-autofill-credit-card-ablation-experiment",
......@@ -3784,7 +3783,7 @@ bool SkipConditionalFeatureEntry(const FeatureEntry& entry) {
}
// enable-ui-devtools is only available on for non Stable channels.
if (!strcmp(ui_devtools::kEnableUiDevTools, entry.internal_name) &&
if (!strcmp(switches::kEnableUiDevTools, entry.internal_name) &&
channel == version_info::Channel::STABLE) {
return true;
}
......
......@@ -16,8 +16,8 @@
#if defined(USE_AURA)
#include "base/run_loop.h"
#include "chrome/common/chrome_switches.h"
#include "components/ui_devtools/devtools_server.h"
#include "components/ui_devtools/switches.h"
#include "components/ui_devtools/views/css_agent.h"
#include "components/ui_devtools/views/dom_agent.h"
#include "components/ui_devtools/views/overlay_agent.h"
......@@ -115,7 +115,7 @@ void ChromeBrowserMainExtraPartsViews::PreProfileInit() {
// Start devtools server
devtools_server_ = ui_devtools::UiDevToolsServer::Create(
nullptr, ui_devtools::kEnableUiDevTools, 9223);
nullptr, switches::kEnableUiDevTools, 9223);
if (devtools_server_) {
auto dom_backend = std::make_unique<ui_devtools::DOMAgent>();
auto overlay_backend =
......
......@@ -353,6 +353,10 @@ const char kEnableSiteSettings[] = "enable-site-settings";
// Enables user control over muting tab audio from the tab strip.
const char kEnableTabAudioMuting[] = "enable-tab-audio-muting";
// Enables DevTools server for UI (mus, ash, etc). Value should be the port the
// server is started on. Default port is 9223.
const char kEnableUiDevTools[] = "enable-ui-devtools";
// Name of the command line flag to force content verification to be on in one
// of various modes.
const char kExtensionContentVerification[] = "extension-content-verification";
......
......@@ -112,6 +112,7 @@ extern const char kEnablePrintPreviewRegisterPromos[];
extern const char kEnablePushApiBackgroundMode[];
extern const char kEnableSiteSettings[];
extern const char kEnableTabAudioMuting[];
extern const char kEnableUiDevTools[];
extern const char kExtensionContentVerification[];
extern const char kExtensionContentVerificationBootstrap[];
extern const char kExtensionContentVerificationEnforce[];
......
......@@ -65,8 +65,6 @@ component("ui_devtools") {
"devtools_server.h",
"string_util.cc",
"string_util.h",
"switches.cc",
"switches.h",
]
defines = [ "UI_DEVTOOLS_IMPLEMENTATION" ]
......
......@@ -15,7 +15,6 @@
#include "base/strings/stringprintf.h"
#include "base/threading/thread_task_runner_handle.h"
#include "base/values.h"
#include "components/ui_devtools/switches.h"
#include "net/base/net_errors.h"
#include "net/log/net_log.h"
#include "net/server/http_server_request_info.h"
......
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "components/ui_devtools/switches.h"
namespace ui_devtools {
// Enables DevTools server for UI (mus, ash, etc). Value should be the port the
// server is started on. Default port is 9332.
const char kEnableUiDevTools[] = "enable-ui-devtools";
} // namespace ui_devtools
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef COMPONENTS_UI_DEVTOOLS_SWITCHES_H_
#define COMPONENTS_UI_DEVTOOLS_SWITCHES_H_
#include "components/ui_devtools/devtools_export.h"
namespace ui_devtools {
extern UI_DEVTOOLS_EXPORT const char kEnableUiDevTools[];
} // namespace ui_devtools
#endif // COMPONENTS_UI_DEVTOOLS_SWITCHES_H_
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment