Commit c5e775d5 authored by Scott Violet's avatar Scott Violet Committed by Commit Bot

chromeos: adds ash::switches::kAshEnableTestInterfaces

While we sort out converting ShelfIntegrationTestApi I'm removing the
dependency on services/ws/common/switches. Specifically,
ShelfIntegrationTestApi is only exposed if a switched defined in
services/ws was supplied. This adds the switch to the ash side in the
short term.

This also removes some unnecessary includes/deps on services/ws.

BUG:960503, 958247
TEST=none

Change-Id: Ibcda3b4fa17de19fc2f6382c3df2d8beca9e2aee
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1616784Reviewed-by: default avatarXiyuan Xia <xiyuan@chromium.org>
Commit-Queue: Scott Violet <sky@chromium.org>
Cr-Commit-Position: refs/heads/master@{#660870}
parent 76fe5b8f
...@@ -1285,7 +1285,6 @@ component("ash") { ...@@ -1285,7 +1285,6 @@ component("ash") {
"//services/device/public/mojom", "//services/device/public/mojom",
"//services/media_session/public/mojom", "//services/media_session/public/mojom",
"//services/service_manager/public/cpp", "//services/service_manager/public/cpp",
"//services/ws/common",
"//services/ws/public/cpp", "//services/ws/public/cpp",
"//services/ws/public/cpp/input_devices", "//services/ws/public/cpp/input_devices",
"//services/ws/public/mojom", "//services/ws/public/mojom",
......
...@@ -47,7 +47,6 @@ ...@@ -47,7 +47,6 @@
#include "base/lazy_instance.h" #include "base/lazy_instance.h"
#include "base/single_thread_task_runner.h" #include "base/single_thread_task_runner.h"
#include "chromeos/constants/chromeos_switches.h" #include "chromeos/constants/chromeos_switches.h"
#include "services/ws/common/switches.h"
namespace ash { namespace ash {
namespace mojo_interface_factory { namespace mojo_interface_factory {
...@@ -328,7 +327,7 @@ void RegisterInterfaces( ...@@ -328,7 +327,7 @@ void RegisterInterfaces(
main_thread_task_runner); main_thread_task_runner);
if (base::CommandLine::ForCurrentProcess()->HasSwitch( if (base::CommandLine::ForCurrentProcess()->HasSwitch(
ws::switches::kUseTestConfig)) { switches::kAshEnableTestInterfaces)) {
registry->AddInterface( registry->AddInterface(
base::BindRepeating(&BindShelfIntegrationTestApiRequestOnMainThread), base::BindRepeating(&BindShelfIntegrationTestApiRequestOnMainThread),
main_thread_task_runner); main_thread_task_runner);
......
...@@ -47,6 +47,15 @@ const char kAshEnablePaletteOnAllDisplays[] = ...@@ -47,6 +47,15 @@ const char kAshEnablePaletteOnAllDisplays[] =
// enter tablet mode. // enter tablet mode.
const char kAshEnableTabletMode[] = "enable-touchview"; const char kAshEnableTabletMode[] = "enable-touchview";
// Used to expose additional test-only interfaces.
// Historical note: this name was originally used by the window-service to
// enable additional test only interfaces, which also enabled test functionality
// in ash. While the window-service is no more, autotest lives on. The string
// value matches that used by the window-service.
// TODO(crbug.com/958247): this is only necessary because of
// ShelfIntegrationTestApi, that likely can be removed.
const char kAshEnableTestInterfaces[] = "use-test-config";
// Enable the wayland server. // Enable the wayland server.
const char kAshEnableWaylandServer[] = "enable-wayland-server"; const char kAshEnableWaylandServer[] = "enable-wayland-server";
......
...@@ -25,6 +25,7 @@ ASH_PUBLIC_EXPORT extern const char kAshEnableV1AppBackButton[]; ...@@ -25,6 +25,7 @@ ASH_PUBLIC_EXPORT extern const char kAshEnableV1AppBackButton[];
ASH_PUBLIC_EXPORT extern const char kAshEnableMagnifierKeyScroller[]; ASH_PUBLIC_EXPORT extern const char kAshEnableMagnifierKeyScroller[];
ASH_PUBLIC_EXPORT extern const char kAshEnablePaletteOnAllDisplays[]; ASH_PUBLIC_EXPORT extern const char kAshEnablePaletteOnAllDisplays[];
ASH_PUBLIC_EXPORT extern const char kAshEnableTabletMode[]; ASH_PUBLIC_EXPORT extern const char kAshEnableTabletMode[];
ASH_PUBLIC_EXPORT extern const char kAshEnableTestInterfaces[];
ASH_PUBLIC_EXPORT extern const char kAshEnableWaylandServer[]; ASH_PUBLIC_EXPORT extern const char kAshEnableWaylandServer[];
ASH_PUBLIC_EXPORT extern const char kAshForceEnableStylusTools[]; ASH_PUBLIC_EXPORT extern const char kAshForceEnableStylusTools[];
ASH_PUBLIC_EXPORT extern const char kAshPowerButtonPosition[]; ASH_PUBLIC_EXPORT extern const char kAshPowerButtonPosition[];
......
...@@ -428,7 +428,6 @@ ...@@ -428,7 +428,6 @@
#include "chromeos/services/secure_channel/secure_channel_service.h" #include "chromeos/services/secure_channel/secure_channel_service.h"
#include "components/user_manager/user_manager.h" #include "components/user_manager/user_manager.h"
#include "services/service_manager/public/mojom/interface_provider_spec.mojom.h" #include "services/service_manager/public/mojom/interface_provider_spec.mojom.h"
#include "services/ws/common/switches.h"
#elif defined(OS_LINUX) #elif defined(OS_LINUX)
#include "chrome/browser/chrome_browser_main_linux.h" #include "chrome/browser/chrome_browser_main_linux.h"
#elif defined(OS_ANDROID) #elif defined(OS_ANDROID)
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
#include "base/macros.h" #include "base/macros.h"
#include "ash/public/cpp/ash_switches.h"
#include "build/build_config.h" #include "build/build_config.h"
#include "chrome/browser/chromeos/arc/arc_session_manager.h" #include "chrome/browser/chromeos/arc/arc_session_manager.h"
#include "chrome/browser/chromeos/arc/arc_util.h" #include "chrome/browser/chromeos/arc/arc_util.h"
...@@ -16,7 +17,6 @@ ...@@ -16,7 +17,6 @@
#include "components/arc/test/connection_holder_util.h" #include "components/arc/test/connection_holder_util.h"
#include "components/arc/test/fake_app_instance.h" #include "components/arc/test/fake_app_instance.h"
#include "components/prefs/pref_service.h" #include "components/prefs/pref_service.h"
#include "services/ws/common/switches.h"
namespace extensions { namespace extensions {
...@@ -30,7 +30,7 @@ class AutotestPrivateApiTest : public ExtensionApiTest { ...@@ -30,7 +30,7 @@ class AutotestPrivateApiTest : public ExtensionApiTest {
// Make ARC enabled for tests. // Make ARC enabled for tests.
arc::SetArcAvailableCommandLineForTesting(command_line); arc::SetArcAvailableCommandLineForTesting(command_line);
// Enable certain Mojo services like ShelfIntegrationTestApi. // Enable certain Mojo services like ShelfIntegrationTestApi.
command_line->AppendSwitch(ws::switches::kUseTestConfig); command_line->AppendSwitch(ash::switches::kAshEnableTestInterfaces);
} }
void SetUpInProcessBrowserTestFixture() override { void SetUpInProcessBrowserTestFixture() override {
......
...@@ -59,7 +59,6 @@ ...@@ -59,7 +59,6 @@
#include "components/user_manager/scoped_user_manager.h" #include "components/user_manager/scoped_user_manager.h"
#include "components/user_manager/user_info.h" #include "components/user_manager/user_info.h"
#include "components/user_manager/user_manager.h" #include "components/user_manager/user_manager.h"
#include "services/ws/common/util.h"
#include "ui/aura/client/aura_constants.h" #include "ui/aura/client/aura_constants.h"
#include "ui/aura/test/env_test_helper.h" #include "ui/aura/test/env_test_helper.h"
#include "ui/aura/window.h" #include "ui/aura/window.h"
......
...@@ -124,7 +124,6 @@ jumbo_component("aura") { ...@@ -124,7 +124,6 @@ jumbo_component("aura") {
"//gpu/ipc/client", "//gpu/ipc/client",
"//mojo/public/cpp/system", "//mojo/public/cpp/system",
"//services/service_manager/public/cpp", "//services/service_manager/public/cpp",
"//services/ws/common",
"//services/ws/public/cpp", "//services/ws/public/cpp",
"//services/ws/public/mojom", "//services/ws/public/mojom",
"//skia", "//skia",
...@@ -230,7 +229,6 @@ jumbo_static_library("test_support") { ...@@ -230,7 +229,6 @@ jumbo_static_library("test_support") {
public_deps = [ public_deps = [
":aura", ":aura",
"//services/ws/common",
# Must be public as headers include buildflags.h. # Must be public as headers include buildflags.h.
"//ui/base:buildflags", "//ui/base:buildflags",
...@@ -339,7 +337,6 @@ test("aura_unittests") { ...@@ -339,7 +337,6 @@ test("aura_unittests") {
"//cc/mojo_embedder", "//cc/mojo_embedder",
"//components/viz/client", "//components/viz/client",
"//mojo/core/embedder", "//mojo/core/embedder",
"//services/ws/common:task_runner_test_base",
"//services/ws/public/cpp", "//services/ws/public/cpp",
"//skia", "//skia",
"//testing/gtest", "//testing/gtest",
......
...@@ -10,7 +10,6 @@ include_rules = [ ...@@ -10,7 +10,6 @@ include_rules = [
"+mojo/public/cpp", "+mojo/public/cpp",
"+services/service_manager/public/cpp", "+services/service_manager/public/cpp",
"+services/service_manager/public/mojom", "+services/service_manager/public/mojom",
"+services/ws/common",
"+services/ws/public/mojom", "+services/ws/public/mojom",
"+skia/ext", "+skia/ext",
"+third_party/skia", "+third_party/skia",
...@@ -20,8 +19,6 @@ include_rules = [ ...@@ -20,8 +19,6 @@ include_rules = [
"+ui/events", "+ui/events",
"+ui/gfx", "+ui/gfx",
"+ui/gl/test", "+ui/gl/test",
"+ui/metro_viewer", # TODO(beng): investigate moving remote_root_window_host
# to ui/metro_viewer.
"+ui/ozone/public", "+ui/ozone/public",
"+ui/platform_window", "+ui/platform_window",
] ]
...@@ -15,8 +15,6 @@ include_rules = [ ...@@ -15,8 +15,6 @@ include_rules = [
"+mojo/public/cpp/system/buffer.h", "+mojo/public/cpp/system/buffer.h",
"+mojo/public/cpp/system/platform_handle.h", "+mojo/public/cpp/system/platform_handle.h",
"+services/viz/public/interfaces/compositing/compositor_frame_sink.mojom.h", "+services/viz/public/interfaces/compositing/compositor_frame_sink.mojom.h",
"+services/ws/common/accelerator_util.h",
"+services/ws/common/task_runner_test_base.h",
"+services/ws/public", "+services/ws/public",
"+ui/gl/gl_bindings.h", "+ui/gl/gl_bindings.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