Nukes //ash/standalone
ash_shell_with_content will serve the same purpose. BUG=none TEST=none Change-Id: I0f41c0cf1d25f994f280d7a5492717c8396b14dd Reviewed-on: https://chromium-review.googlesource.com/1042495 Reviewed-by: James Cook <jamescook@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Scott Violet <sky@chromium.org> Cr-Commit-Position: refs/heads/master@{#556068}
This commit is contained in:
@ -1,42 +0,0 @@
|
||||
# Copyright 2017 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.
|
||||
|
||||
import("//services/service_manager/public/cpp/service.gni")
|
||||
import("//services/service_manager/public/service_manifest.gni")
|
||||
|
||||
assert(is_chromeos)
|
||||
|
||||
service("ash_standalone") {
|
||||
output_name = "ash_standalone"
|
||||
testonly = true
|
||||
|
||||
sources = [
|
||||
"ash_standalone_main.cc",
|
||||
]
|
||||
|
||||
deps = [
|
||||
"//ash",
|
||||
"//ash:ash_service_resources",
|
||||
"//ash:ash_service_resources_200",
|
||||
"//ash:ash_shell_lib",
|
||||
"//ash/app_list/presenter",
|
||||
"//services/service_manager/public/cpp",
|
||||
"//services/ui/public/cpp/input_devices",
|
||||
"//services/ui/public/interfaces",
|
||||
"//ui/views/examples:views_examples_lib",
|
||||
]
|
||||
|
||||
# TODO(beng): This target relies on //mash/session, but there is a cycle so we
|
||||
# can't state that dependency here.
|
||||
data_deps = [
|
||||
"//ash:ash_service_resources",
|
||||
"//ash:ash_service_resources_200",
|
||||
"//services/ui",
|
||||
]
|
||||
}
|
||||
|
||||
service_manifest("manifest") {
|
||||
name = "ash_standalone"
|
||||
source = "manifest.json"
|
||||
}
|
@ -1,2 +0,0 @@
|
||||
per-file manifest.json=set noparent
|
||||
per-file manifest.json=file://ipc/SECURITY_OWNERS
|
@ -1,7 +0,0 @@
|
||||
Ash standalone is a version of ash intended for use without Chrome for
|
||||
testing/debugging purposes. Ash typically expects Chrome to connect to it
|
||||
and configure various state (such as login). Ash standalone configures
|
||||
ash in a test environment so that it does not need Chrome to connect
|
||||
to it. Run it via `mash_session`, e.g.:
|
||||
|
||||
out_dir/mash --service=mash_session --window-manager=ash_standalone
|
@ -1,99 +0,0 @@
|
||||
// Copyright 2017 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 <memory>
|
||||
|
||||
#include "ash/shell.h"
|
||||
#include "ash/shell/example_session_controller_client.h"
|
||||
#include "ash/shell/shell_delegate_impl.h"
|
||||
#include "ash/shell/shell_views_delegate.h"
|
||||
#include "ash/shell/window_type_launcher.h"
|
||||
#include "ash/shell/window_watcher.h"
|
||||
#include "ash/shell_observer.h"
|
||||
#include "ash/window_manager_service.h"
|
||||
#include "base/bind.h"
|
||||
#include "base/bind_helpers.h"
|
||||
#include "services/service_manager/public/c/main.h"
|
||||
#include "services/service_manager/public/cpp/connector.h"
|
||||
#include "services/service_manager/public/cpp/service_runner.h"
|
||||
#include "services/ui/public/cpp/input_devices/input_device_client.h"
|
||||
#include "services/ui/public/interfaces/constants.mojom.h"
|
||||
#include "ui/aura/window.h"
|
||||
#include "ui/aura/window_tree_host.h"
|
||||
#include "ui/views/examples/examples_window.h"
|
||||
|
||||
namespace ash {
|
||||
namespace {
|
||||
|
||||
void ShowViewsExamples() {
|
||||
views::examples::ShowExamplesWindow(views::examples::DO_NOTHING_ON_CLOSE);
|
||||
}
|
||||
|
||||
class ShellInit : public shell::ShellDelegateImpl, public ShellObserver {
|
||||
public:
|
||||
ShellInit()
|
||||
: input_device_client_(std::make_unique<ui::InputDeviceClient>()) {}
|
||||
~ShellInit() override = default;
|
||||
|
||||
void set_window_manager_service(WindowManagerService* service) {
|
||||
window_manager_service_ = service;
|
||||
}
|
||||
|
||||
// shell::ShellDelegateImpl:
|
||||
void PreInit() override {
|
||||
DCHECK(window_manager_service_->GetConnector());
|
||||
ui::mojom::InputDeviceServerPtr server;
|
||||
window_manager_service_->GetConnector()->BindInterface(
|
||||
ui::mojom::kServiceName, &server);
|
||||
input_device_client_->Connect(std::move(server));
|
||||
|
||||
shell::ShellDelegateImpl::PreInit();
|
||||
Shell::Get()->AddShellObserver(this);
|
||||
}
|
||||
|
||||
// ShellObserver:
|
||||
void OnShellInitialized() override {
|
||||
Shell::Get()->RemoveShellObserver(this);
|
||||
|
||||
// Initialize session controller client and create fake user sessions. The
|
||||
// fake user sessions makes ash into the logged in state.
|
||||
example_session_controller_client_ =
|
||||
std::make_unique<shell::ExampleSessionControllerClient>(
|
||||
Shell::Get()->session_controller());
|
||||
example_session_controller_client_->Initialize();
|
||||
|
||||
window_watcher_ = std::make_unique<shell::WindowWatcher>();
|
||||
shell::InitWindowTypeLauncher(base::Bind(&ShowViewsExamples));
|
||||
|
||||
Shell::GetPrimaryRootWindow()->GetHost()->Show();
|
||||
}
|
||||
|
||||
private:
|
||||
// Used to observe new windows and update the shelf accordingly.
|
||||
std::unique_ptr<shell::WindowWatcher> window_watcher_;
|
||||
std::unique_ptr<shell::ExampleSessionControllerClient>
|
||||
example_session_controller_client_;
|
||||
std::unique_ptr<ui::InputDeviceClient> input_device_client_;
|
||||
WindowManagerService* window_manager_service_ = nullptr;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(ShellInit);
|
||||
};
|
||||
|
||||
} // namespace
|
||||
} // namespace ash
|
||||
|
||||
MojoResult ServiceMain(MojoHandle service_request_handle) {
|
||||
ash::shell::ShellViewsDelegate shell_views_delegate;
|
||||
const bool show_primary_host_on_connect = false;
|
||||
std::unique_ptr<ash::ShellInit> shell_init_ptr =
|
||||
std::make_unique<ash::ShellInit>();
|
||||
ash::ShellInit* shell_init = shell_init_ptr.get();
|
||||
ash::WindowManagerService* window_manager_service =
|
||||
new ash::WindowManagerService(show_primary_host_on_connect,
|
||||
ash::Config::MUS,
|
||||
std::move(shell_init_ptr));
|
||||
shell_init->set_window_manager_service(window_manager_service);
|
||||
service_manager::ServiceRunner runner(window_manager_service);
|
||||
return runner.Run(service_request_handle);
|
||||
}
|
@ -1,37 +0,0 @@
|
||||
{
|
||||
"name": "ash_standalone",
|
||||
"display_name": "Standalone (testing) Ash Window Manager and Shell",
|
||||
"interface_provider_specs": {
|
||||
"service_manager:connector": {
|
||||
"provides": {
|
||||
"ash": [
|
||||
"app_list::mojom::AppList",
|
||||
"ash::mojom::AcceleratorController",
|
||||
"ash::mojom::CastConfig",
|
||||
"ash::mojom::EventRewriterController",
|
||||
"ash::mojom::HighlighterController",
|
||||
"ash::mojom::ImeController",
|
||||
"ash::mojom::LocaleNotificationController",
|
||||
"ash::mojom::MediaController",
|
||||
"ash::mojom::NewWindowController",
|
||||
"ash::mojom::NoteTakingController",
|
||||
"ash::mojom::SessionController",
|
||||
"ash::mojom::ShelfController",
|
||||
"ash::mojom::ShutdownController",
|
||||
"ash::mojom::SystemTray",
|
||||
"ash::mojom::TabletModeController",
|
||||
"ash::mojom::VoiceInteractionController",
|
||||
"ash::mojom::VpnList",
|
||||
"ash::mojom::WallpaperController"
|
||||
],
|
||||
"mus:window_manager": [ "ui::mojom::AcceleratorRegistrar" ]
|
||||
},
|
||||
"requires": {
|
||||
"*": [ "accessibility", "app" ],
|
||||
"preferences_forwarder": [ "pref_client" ],
|
||||
"ui": [ "display_dev", "window_manager" ],
|
||||
"touch_hud_app": [ "mash:launchable" ]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -29,7 +29,6 @@ group("all") {
|
||||
"//ash/components/autoclick:autoclick_app",
|
||||
"//ash/components/quick_launch:quick_launch_app",
|
||||
"//ash/components/touch_hud:touch_hud_app",
|
||||
"//ash/standalone:ash_standalone",
|
||||
"//mash:mash_unittests",
|
||||
]
|
||||
}
|
||||
@ -59,7 +58,6 @@ catalog("catalog") {
|
||||
standalone_services += [
|
||||
"//ash:manifest",
|
||||
"//ash/components/quick_launch:manifest",
|
||||
"//ash/standalone:manifest",
|
||||
]
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user