Commit d89f32bf authored by James Cook's avatar James Cook Committed by Commit Bot

Move quick_launch mojo app to //ash/components

It's a mojo mini-app.  It's only used with mash, which only runs on
Chrome OS. Move it to the Chrome OS UI directory.

NOPRESUBMIT=true

Bug: none
Test: bots
Change-Id: I8da161c8ec4c95ab284d4b0e5248b6fff5a04406
Reviewed-on: https://chromium-review.googlesource.com/917208
Commit-Queue: James Cook <jamescook@chromium.org>
Reviewed-by: default avatarScott Violet <sky@chromium.org>
Cr-Commit-Position: refs/heads/master@{#536758}
parent bac67e8b
...@@ -2027,11 +2027,11 @@ source_set("mash_unittests") { ...@@ -2027,11 +2027,11 @@ source_set("mash_unittests") {
":ash_service_resources", ":ash_service_resources",
"//ash", "//ash",
"//ash:test_support_without_content", "//ash:test_support_without_content",
"//ash/components/quick_launch/public/mojom:constants",
"//ash/public/cpp", "//ash/public/cpp",
"//base", "//base",
"//base/test:test_config", "//base/test:test_config",
"//base/test:test_support", "//base/test:test_support",
"//mash/quick_launch/public/mojom:constants",
"//mojo/public/cpp/system", "//mojo/public/cpp/system",
"//services/service_manager/public/cpp:service_test_support", "//services/service_manager/public/cpp:service_test_support",
"//services/ui/common:mus_common", "//services/ui/common:mus_common",
...@@ -2058,7 +2058,7 @@ source_set("mash_unittests") { ...@@ -2058,7 +2058,7 @@ source_set("mash_unittests") {
data_deps = [ data_deps = [
":ash_service", ":ash_service",
"//mash/quick_launch", "//ash/components/quick_launch",
"//services/ui/ime/test_ime_driver", "//services/ui/ime/test_ime_driver",
] ]
} }
...@@ -94,7 +94,7 @@ include_rules = [ ...@@ -94,7 +94,7 @@ include_rules = [
specific_include_rules = { specific_include_rules = {
"app_launch_unittest.cc": [ "app_launch_unittest.cc": [
"+mash/quick_launch/public", "+ash/components/quick_launch/public",
], ],
"root_window_controller\.*": [ "root_window_controller\.*": [
"+ash/host" "+ash/host"
......
...@@ -2,11 +2,11 @@ ...@@ -2,11 +2,11 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "ash/components/quick_launch/public/mojom/constants.mojom.h"
#include "ash/public/interfaces/constants.mojom.h" #include "ash/public/interfaces/constants.mojom.h"
#include "base/bind.h" #include "base/bind.h"
#include "base/command_line.h" #include "base/command_line.h"
#include "base/run_loop.h" #include "base/run_loop.h"
#include "mash/quick_launch/public/mojom/constants.mojom.h"
#include "services/service_manager/public/cpp/service_test.h" #include "services/service_manager/public/cpp/service_test.h"
#include "services/ui/public/interfaces/constants.mojom.h" #include "services/ui/public/interfaces/constants.mojom.h"
#include "services/ui/public/interfaces/window_server_test.mojom.h" #include "services/ui/public/interfaces/window_server_test.mojom.h"
...@@ -37,7 +37,7 @@ class AppLaunchTest : public service_manager::test::ServiceTest { ...@@ -37,7 +37,7 @@ class AppLaunchTest : public service_manager::test::ServiceTest {
TEST_F(AppLaunchTest, TestQuickLaunch) { TEST_F(AppLaunchTest, TestQuickLaunch) {
connector()->StartService(mojom::kServiceName); connector()->StartService(mojom::kServiceName);
connector()->StartService(mash::quick_launch::mojom::kServiceName); connector()->StartService(quick_launch::mojom::kServiceName);
ui::mojom::WindowServerTestPtr test_interface; ui::mojom::WindowServerTestPtr test_interface;
connector()->BindInterface(ui::mojom::kServiceName, &test_interface); connector()->BindInterface(ui::mojom::kServiceName, &test_interface);
...@@ -45,7 +45,7 @@ TEST_F(AppLaunchTest, TestQuickLaunch) { ...@@ -45,7 +45,7 @@ TEST_F(AppLaunchTest, TestQuickLaunch) {
base::RunLoop run_loop; base::RunLoop run_loop;
bool success = false; bool success = false;
test_interface->EnsureClientHasDrawnWindow( test_interface->EnsureClientHasDrawnWindow(
mash::quick_launch::mojom::kServiceName, quick_launch::mojom::kServiceName,
base::Bind(&RunCallback, &success, run_loop.QuitClosure())); base::Bind(&RunCallback, &success, run_loop.QuitClosure()));
run_loop.Run(); run_loop.Run();
EXPECT_TRUE(success); EXPECT_TRUE(success);
......
...@@ -2,12 +2,12 @@ ...@@ -2,12 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "mash/quick_launch/quick_launch.h"
#include "services/service_manager/public/c/main.h" #include "services/service_manager/public/c/main.h"
#include "ash/components/quick_launch/quick_launch.h"
#include "services/service_manager/public/cpp/service_runner.h" #include "services/service_manager/public/cpp/service_runner.h"
MojoResult ServiceMain(MojoHandle service_request_handle) { MojoResult ServiceMain(MojoHandle service_request_handle) {
mash::quick_launch::QuickLaunch* app = new mash::quick_launch::QuickLaunch; quick_launch::QuickLaunch* app = new quick_launch::QuickLaunch;
app->set_running_standalone(true); app->set_running_standalone(true);
service_manager::ServiceRunner runner(app); service_manager::ServiceRunner runner(app);
return runner.Run(service_request_handle); return runner.Run(service_request_handle);
......
...@@ -2,6 +2,6 @@ ...@@ -2,6 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
module mash.quick_launch.mojom; module quick_launch.mojom;
const string kServiceName = "quick_launch"; const string kServiceName = "quick_launch";
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "mash/quick_launch/quick_launch.h" #include "ash/components/quick_launch/quick_launch.h"
#include "base/macros.h" #include "base/macros.h"
#include "base/memory/ptr_util.h" #include "base/memory/ptr_util.h"
...@@ -28,7 +28,6 @@ ...@@ -28,7 +28,6 @@
#include "ui/views/widget/widget_delegate.h" #include "ui/views/widget/widget_delegate.h"
#include "url/gurl.h" #include "url/gurl.h"
namespace mash {
namespace quick_launch { namespace quick_launch {
class QuickLaunchUI : public views::WidgetDelegateView, class QuickLaunchUI : public views::WidgetDelegateView,
...@@ -47,9 +46,7 @@ class QuickLaunchUI : public views::WidgetDelegateView, ...@@ -47,9 +46,7 @@ class QuickLaunchUI : public views::WidgetDelegateView,
UpdateEntries(); UpdateEntries();
} }
~QuickLaunchUI() override { ~QuickLaunchUI() override { quick_launch_->RemoveWindow(GetWidget()); }
quick_launch_->RemoveWindow(GetWidget());
}
private: private:
// Overridden from views::WidgetDelegate: // Overridden from views::WidgetDelegate:
...@@ -124,8 +121,8 @@ class QuickLaunchUI : public views::WidgetDelegateView, ...@@ -124,8 +121,8 @@ class QuickLaunchUI : public views::WidgetDelegateView,
void UpdateEntries() { void UpdateEntries() {
catalog_->GetEntriesProvidingCapability( catalog_->GetEntriesProvidingCapability(
"mash:launchable", "mash:launchable",
base::Bind(&QuickLaunchUI::OnGotCatalogEntries, base::BindRepeating(&QuickLaunchUI::OnGotCatalogEntries,
base::Unretained(this))); base::Unretained(this)));
} }
void OnGotCatalogEntries(std::vector<catalog::mojom::EntryPtr> entries) { void OnGotCatalogEntries(std::vector<catalog::mojom::EntryPtr> entries) {
...@@ -136,9 +133,9 @@ class QuickLaunchUI : public views::WidgetDelegateView, ...@@ -136,9 +133,9 @@ class QuickLaunchUI : public views::WidgetDelegateView,
void Launch(const std::string& name, bool new_window) { void Launch(const std::string& name, bool new_window) {
::mash::mojom::LaunchablePtr launchable; ::mash::mojom::LaunchablePtr launchable;
connector_->BindInterface(name, &launchable); connector_->BindInterface(name, &launchable);
launchable->Launch(mojom::kWindow, launchable->Launch(mash::mojom::kWindow,
new_window ? mojom::LaunchMode::MAKE_NEW new_window ? mash::mojom::LaunchMode::MAKE_NEW
: mojom::LaunchMode::REUSE); : mash::mojom::LaunchMode::REUSE);
} }
QuickLaunch* quick_launch_; QuickLaunch* quick_launch_;
...@@ -153,7 +150,7 @@ class QuickLaunchUI : public views::WidgetDelegateView, ...@@ -153,7 +150,7 @@ class QuickLaunchUI : public views::WidgetDelegateView,
QuickLaunch::QuickLaunch() { QuickLaunch::QuickLaunch() {
registry_.AddInterface<::mash::mojom::Launchable>( registry_.AddInterface<::mash::mojom::Launchable>(
base::Bind(&QuickLaunch::Create, base::Unretained(this))); base::BindRepeating(&QuickLaunch::Create, base::Unretained(this)));
} }
QuickLaunch::~QuickLaunch() { QuickLaunch::~QuickLaunch() {
...@@ -183,7 +180,7 @@ void QuickLaunch::OnStart() { ...@@ -183,7 +180,7 @@ void QuickLaunch::OnStart() {
return; return;
} }
Launch(mojom::kWindow, mojom::LaunchMode::MAKE_NEW); Launch(mash::mojom::kWindow, mash::mojom::LaunchMode::MAKE_NEW);
} }
void QuickLaunch::OnBindInterface( void QuickLaunch::OnBindInterface(
...@@ -193,9 +190,9 @@ void QuickLaunch::OnBindInterface( ...@@ -193,9 +190,9 @@ void QuickLaunch::OnBindInterface(
registry_.BindInterface(interface_name, std::move(interface_pipe)); registry_.BindInterface(interface_name, std::move(interface_pipe));
} }
void QuickLaunch::Launch(uint32_t what, mojom::LaunchMode how) { void QuickLaunch::Launch(uint32_t what, mash::mojom::LaunchMode how) {
bool reuse = how == mojom::LaunchMode::REUSE || bool reuse = how == mash::mojom::LaunchMode::REUSE ||
how == mojom::LaunchMode::DEFAULT; how == mash::mojom::LaunchMode::DEFAULT;
if (reuse && !windows_.empty()) { if (reuse && !windows_.empty()) {
windows_.back()->Activate(); windows_.back()->Activate();
return; return;
...@@ -216,4 +213,3 @@ void QuickLaunch::Create(::mash::mojom::LaunchableRequest request) { ...@@ -216,4 +213,3 @@ void QuickLaunch::Create(::mash::mojom::LaunchableRequest request) {
} }
} // namespace quick_launch } // namespace quick_launch
} // namespace mash
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#ifndef MASH_QUICK_LAUNCH_QUICK_LAUNCH_H_ #ifndef ASH_COMPONENTS_QUICK_LAUNCH_QUICK_LAUNCH_H_
#define MASH_QUICK_LAUNCH_QUICK_LAUNCH_H_ #define ASH_COMPONENTS_QUICK_LAUNCH_QUICK_LAUNCH_H_
#include <memory> #include <memory>
...@@ -16,9 +16,8 @@ ...@@ -16,9 +16,8 @@
namespace views { namespace views {
class AuraInit; class AuraInit;
class Widget; class Widget;
} } // namespace views
namespace mash {
namespace quick_launch { namespace quick_launch {
class QuickLaunch : public service_manager::Service, class QuickLaunch : public service_manager::Service,
...@@ -56,6 +55,5 @@ class QuickLaunch : public service_manager::Service, ...@@ -56,6 +55,5 @@ class QuickLaunch : public service_manager::Service,
}; };
} // namespace quick_launch } // namespace quick_launch
} // namespace mash
#endif // MASH_QUICK_LAUNCH_QUICK_LAUNCH_H_ #endif // ASH_COMPONENTS_QUICK_LAUNCH_QUICK_LAUNCH_H_
...@@ -379,8 +379,8 @@ static_library("test_support") { ...@@ -379,8 +379,8 @@ static_library("test_support") {
if (enable_mus) { if (enable_mus) {
deps += [ deps += [
"//ash/components/quick_launch/public/mojom:constants",
"//mash/common", "//mash/common",
"//mash/quick_launch/public/mojom:constants",
"//services/ui/public/interfaces:constants", "//services/ui/public/interfaces:constants",
] ]
} }
...@@ -440,7 +440,7 @@ service_manifest("chrome_content_packaged_services_manifest_overlay") { ...@@ -440,7 +440,7 @@ service_manifest("chrome_content_packaged_services_manifest_overlay") {
"//chrome/browser/chrome_content_packaged_services_manifest_overlay.json" "//chrome/browser/chrome_content_packaged_services_manifest_overlay.json"
packaged_services = chrome_packaged_services packaged_services = chrome_packaged_services
if (enable_mus) { if (enable_mus) {
packaged_services += [ "//mash/quick_launch:manifest" ] packaged_services += [ "//ash/components/quick_launch:manifest" ]
} }
if (is_chromeos) { if (is_chromeos) {
packaged_services += [ packaged_services += [
......
...@@ -31,7 +31,7 @@ include_rules = [ ...@@ -31,7 +31,7 @@ include_rules = [
"+extensions/common/constants.h", "+extensions/common/constants.h",
"+headless/public", # For headless mode. "+headless/public", # For headless mode.
"+mash/common", "+mash/common",
"+mash/quick_launch/public", "+ash/components/quick_launch/public",
"+native_client/src/trusted/service_runtime/osx", "+native_client/src/trusted/service_runtime/osx",
"+remoting/client/plugin", "+remoting/client/plugin",
"+sandbox", "+sandbox",
......
...@@ -2869,11 +2869,11 @@ split_static_library("browser") { ...@@ -2869,11 +2869,11 @@ split_static_library("browser") {
] ]
deps += [ deps += [
"//ash", "//ash",
"//ash/components/quick_launch/public/mojom:constants",
"//ash/public/cpp", "//ash/public/cpp",
"//chrome/browser/chromeos", "//chrome/browser/chromeos",
"//components/font_service:lib", "//components/font_service:lib",
"//components/font_service/public/interfaces", "//components/font_service/public/interfaces",
"//mash/quick_launch/public/mojom:constants",
"//services/ui/public/cpp/input_devices", "//services/ui/public/cpp/input_devices",
"//services/ui/public/cpp/input_devices:input_device_controller", "//services/ui/public/cpp/input_devices:input_device_controller",
"//services/ui/public/interfaces", "//services/ui/public/interfaces",
......
...@@ -85,6 +85,7 @@ include_rules = [ ...@@ -85,6 +85,7 @@ include_rules = [
# //ash/README.md. # //ash/README.md.
"-ash", "-ash",
"+ash/public", "+ash/public",
"+ash/components/quick_launch/public/mojom",
# chrome only needs switches from cc. All usage of the compositor is from # chrome only needs switches from cc. All usage of the compositor is from
# content. Definitely don't include generic stuff from cc/base here, if this # content. Definitely don't include generic stuff from cc/base here, if this
...@@ -112,8 +113,6 @@ include_rules = [ ...@@ -112,8 +113,6 @@ include_rules = [
# Should be removed once the actual network service ships. # Should be removed once the actual network service ships.
"+content/public/network", "+content/public/network",
"+mash/quick_launch/public/mojom",
# Other libraries. # Other libraries.
"+libxml", "+libxml",
"+third_party/google_toolbox_for_mac/src", "+third_party/google_toolbox_for_mac/src",
...@@ -204,7 +203,7 @@ specific_include_rules = { ...@@ -204,7 +203,7 @@ specific_include_rules = {
"+ash/shell.h", "+ash/shell.h",
], ],
"mash_service_registry.cc": [ "mash_service_registry.cc": [
"+mash/quick_launch/quick_launch.h", "+ash/components/quick_launch/quick_launch.h",
], ],
"display_info_provider_chromeos_unittest.cc": [ "display_info_provider_chromeos_unittest.cc": [
"+ui/events/devices/touch_device_transform.h" "+ui/events/devices/touch_device_transform.h"
......
...@@ -4,12 +4,11 @@ ...@@ -4,12 +4,11 @@
#include "chrome/browser/mash_service_registry.h" #include "chrome/browser/mash_service_registry.h"
#include "ash/components/quick_launch/public/mojom/constants.mojom.h"
#include "ash/public/interfaces/constants.mojom.h" #include "ash/public/interfaces/constants.mojom.h"
#include "base/strings/utf_string_conversions.h" #include "base/strings/utf_string_conversions.h"
#include "build/build_config.h" #include "build/build_config.h"
#include "components/font_service/public/interfaces/constants.mojom.h" #include "components/font_service/public/interfaces/constants.mojom.h"
#include "mash/quick_launch/public/mojom/constants.mojom.h"
#include "mash/quick_launch/quick_launch.h"
#include "services/ui/public/interfaces/constants.mojom.h" #include "services/ui/public/interfaces/constants.mojom.h"
using content::ContentBrowserClient; using content::ContentBrowserClient;
...@@ -24,7 +23,7 @@ struct Service { ...@@ -24,7 +23,7 @@ struct Service {
}; };
constexpr Service kServices[] = { constexpr Service kServices[] = {
{mash::quick_launch::mojom::kServiceName, "Quick Launch", nullptr}, {quick_launch::mojom::kServiceName, "Quick Launch", nullptr},
{ui::mojom::kServiceName, "UI Service", kAshAndUiProcessGroup}, {ui::mojom::kServiceName, "UI Service", kAshAndUiProcessGroup},
{ash::mojom::kServiceName, "Ash Window Manager and Shell", {ash::mojom::kServiceName, "Ash Window Manager and Shell",
kAshAndUiProcessGroup}, kAshAndUiProcessGroup},
......
include_rules = [ include_rules = [
# TODO(mash): Remove. http://crbug.com/678705 # TODO(mash): Remove. http://crbug.com/678705
"+ash", "+ash",
"+ash/components/quick_launch/public",
"+chrome/browser/ui/views", "+chrome/browser/ui/views",
"+components/constrained_window", "+components/constrained_window",
"+mash/common", "+mash/common",
"+mash/quick_launch/public",
"+services/ui/public/cpp", "+services/ui/public/cpp",
"+components/user_manager", "+components/user_manager",
"+third_party/libaddressinput", "+third_party/libaddressinput",
......
...@@ -149,12 +149,12 @@ static_library("utility") { ...@@ -149,12 +149,12 @@ static_library("utility") {
deps += [ deps += [
"//ash", "//ash",
"//ash/autoclick/mus:lib", "//ash/autoclick/mus:lib",
"//ash/components/quick_launch:lib",
"//ash/components/quick_launch/public/mojom",
"//ash/touch_hud/mus:lib", "//ash/touch_hud/mus:lib",
"//chrome/services/file_util:lib", "//chrome/services/file_util:lib",
"//components/font_service:lib", "//components/font_service:lib",
"//components/font_service/public/interfaces", "//components/font_service/public/interfaces",
"//mash/quick_launch:lib",
"//mash/quick_launch/public/mojom",
"//services/ui:lib", "//services/ui:lib",
"//services/ui/public/interfaces", "//services/ui/public/interfaces",
] ]
......
...@@ -44,14 +44,14 @@ include_rules = [ ...@@ -44,14 +44,14 @@ include_rules = [
specific_include_rules = { specific_include_rules = {
"mash_service_factory.cc": [ "mash_service_factory.cc": [
"+ash/window_manager_service.h",
"+ash/autoclick/mus/autoclick_application.h", "+ash/autoclick/mus/autoclick_application.h",
"+ash/components/quick_launch/public",
"+ash/components/quick_launch/quick_launch.h",
"+ash/public/interfaces", "+ash/public/interfaces",
"+ash/touch_hud/mus/touch_hud_application.h", "+ash/touch_hud/mus/touch_hud_application.h",
"+ash/window_manager_service.h",
"+components/font_service/font_service_app.h", "+components/font_service/font_service_app.h",
"+components/font_service/public/interfaces", "+components/font_service/public/interfaces",
"+mash/quick_launch/public",
"+mash/quick_launch/quick_launch.h",
"+services/ui/common/image_cursors_set.h", "+services/ui/common/image_cursors_set.h",
"+services/ui/public", "+services/ui/public",
"+services/ui/service.h", "+services/ui/service.h",
......
...@@ -7,6 +7,8 @@ ...@@ -7,6 +7,8 @@
#include <memory> #include <memory>
#include "ash/autoclick/mus/autoclick_application.h" #include "ash/autoclick/mus/autoclick_application.h"
#include "ash/components/quick_launch/public/mojom/constants.mojom.h"
#include "ash/components/quick_launch/quick_launch.h"
#include "ash/public/interfaces/constants.mojom.h" #include "ash/public/interfaces/constants.mojom.h"
#include "ash/touch_hud/mus/touch_hud_application.h" #include "ash/touch_hud/mus/touch_hud_application.h"
#include "ash/window_manager_service.h" #include "ash/window_manager_service.h"
...@@ -14,8 +16,6 @@ ...@@ -14,8 +16,6 @@
#include "build/build_config.h" #include "build/build_config.h"
#include "components/font_service/font_service_app.h" #include "components/font_service/font_service_app.h"
#include "components/font_service/public/interfaces/constants.mojom.h" #include "components/font_service/public/interfaces/constants.mojom.h"
#include "mash/quick_launch/public/mojom/constants.mojom.h"
#include "mash/quick_launch/quick_launch.h"
#include "services/ui/common/image_cursors_set.h" #include "services/ui/common/image_cursors_set.h"
#include "services/ui/public/interfaces/constants.mojom.h" #include "services/ui/public/interfaces/constants.mojom.h"
#include "services/ui/service.h" #include "services/ui/service.h"
...@@ -72,7 +72,7 @@ std::unique_ptr<service_manager::Service> CreateAccessibilityAutoclick() { ...@@ -72,7 +72,7 @@ std::unique_ptr<service_manager::Service> CreateAccessibilityAutoclick() {
} }
std::unique_ptr<service_manager::Service> CreateQuickLaunch() { std::unique_ptr<service_manager::Service> CreateQuickLaunch() {
return std::make_unique<mash::quick_launch::QuickLaunch>(); return std::make_unique<quick_launch::QuickLaunch>();
} }
std::unique_ptr<service_manager::Service> CreateTouchHud() { std::unique_ptr<service_manager::Service> CreateTouchHud() {
...@@ -93,7 +93,7 @@ MashServiceFactory::~MashServiceFactory() = default; ...@@ -93,7 +93,7 @@ MashServiceFactory::~MashServiceFactory() = default;
void MashServiceFactory::RegisterOutOfProcessServices( void MashServiceFactory::RegisterOutOfProcessServices(
content::ContentUtilityClient::StaticServiceMap* services) { content::ContentUtilityClient::StaticServiceMap* services) {
RegisterUiService(services, cursors_.get()); RegisterUiService(services, cursors_.get());
RegisterMashService(services, mash::quick_launch::mojom::kServiceName, RegisterMashService(services, quick_launch::mojom::kServiceName,
&CreateQuickLaunch); &CreateQuickLaunch);
RegisterMashService(services, ash::mojom::kServiceName, &CreateAshService); RegisterMashService(services, ash::mojom::kServiceName, &CreateAshService);
RegisterMashService(services, "accessibility_autoclick", RegisterMashService(services, "accessibility_autoclick",
......
...@@ -17,7 +17,6 @@ group("all") { ...@@ -17,7 +17,6 @@ group("all") {
"//components/leveldb", "//components/leveldb",
"//mash/catalog_viewer", "//mash/catalog_viewer",
"//mash/example", "//mash/example",
"//mash/quick_launch",
"//mash/runner", "//mash/runner",
"//mash/session", "//mash/session",
"//mash/simple_wm", "//mash/simple_wm",
...@@ -28,6 +27,7 @@ group("all") { ...@@ -28,6 +27,7 @@ group("all") {
if (is_chromeos) { if (is_chromeos) {
deps += [ deps += [
"//ash/autoclick/mus:accessibility_autoclick", "//ash/autoclick/mus:accessibility_autoclick",
"//ash/components/quick_launch",
"//ash/standalone:ash_standalone", "//ash/standalone:ash_standalone",
"//ash/touch_hud/mus:touch_hud", "//ash/touch_hud/mus:touch_hud",
"//mash:mash_unittests", "//mash:mash_unittests",
...@@ -43,7 +43,6 @@ catalog("catalog") { ...@@ -43,7 +43,6 @@ catalog("catalog") {
standalone_services = [ standalone_services = [
"//components/leveldb:manifest", "//components/leveldb:manifest",
"//mash/catalog_viewer:manifest", "//mash/catalog_viewer:manifest",
"//mash/quick_launch:manifest",
"//mash/session:manifest", "//mash/session:manifest",
"//mash/task_viewer:manifest", "//mash/task_viewer:manifest",
"//services/ui:manifest", "//services/ui:manifest",
...@@ -59,6 +58,7 @@ catalog("catalog") { ...@@ -59,6 +58,7 @@ catalog("catalog") {
if (is_chromeos) { if (is_chromeos) {
standalone_services += [ standalone_services += [
"//ash:manifest", "//ash:manifest",
"//ash/components/quick_launch:manifest",
"//ash/standalone:manifest", "//ash/standalone:manifest",
] ]
} }
......
...@@ -17,18 +17,18 @@ source_set("lib") { ...@@ -17,18 +17,18 @@ source_set("lib") {
deps = [ deps = [
"//base", "//base",
"//mash/common", "//mash/common",
"//mash/quick_launch/public/mojom:constants",
"//mojo/common", "//mojo/common",
"//mojo/public/cpp/bindings", "//mojo/public/cpp/bindings",
"//services/service_manager/public/cpp", "//services/service_manager/public/cpp",
] ]
data_deps = [
"//mash/quick_launch",
]
if (is_chromeos) { if (is_chromeos) {
data_deps += [ "//ash:ash_service" ] deps += [ "//ash/components/quick_launch/public/mojom:constants" ]
data_deps = [
"//ash:ash_service",
"//ash/components/quick_launch",
]
} }
} }
......
include_rules = [ include_rules = [
"+ash/components/quick_launch/public",
"+content/public/common/service_names.mojom.h", "+content/public/common/service_names.mojom.h",
] ]
...@@ -8,10 +8,13 @@ ...@@ -8,10 +8,13 @@
#include "base/command_line.h" #include "base/command_line.h"
#include "base/message_loop/message_loop.h" #include "base/message_loop/message_loop.h"
#include "mash/common/config.h" #include "mash/common/config.h"
#include "mash/quick_launch/public/mojom/constants.mojom.h"
#include "services/service_manager/public/cpp/connector.h" #include "services/service_manager/public/cpp/connector.h"
#include "services/service_manager/public/cpp/service_context.h" #include "services/service_manager/public/cpp/service_context.h"
#if defined(OS_CHROMEOS)
#include "ash/components/quick_launch/public/mojom/constants.mojom.h" // nogncheck
#endif
namespace mash { namespace mash {
namespace session { namespace session {
...@@ -20,13 +23,15 @@ Session::~Session() = default; ...@@ -20,13 +23,15 @@ Session::~Session() = default;
void Session::OnStart() { void Session::OnStart() {
StartWindowManager(); StartWindowManager();
#if defined(OS_CHROMEOS)
// TODO(jonross): Re-enable when QuickLaunch for all builds once it no longer // TODO(jonross): Re-enable when QuickLaunch for all builds once it no longer
// deadlocks with ServiceManager shutdown in mash_browser_tests. // deadlocks with ServiceManager shutdown in mash_browser_tests.
// (crbug.com/594852) // (crbug.com/594852)
if (base::CommandLine::ForCurrentProcess()->HasSwitch( if (base::CommandLine::ForCurrentProcess()->HasSwitch(
quick_launch::mojom::kServiceName)) { quick_launch::mojom::kServiceName)) {
StartQuickLaunch(); context()->connector()->StartService(quick_launch::mojom::kServiceName);
} }
#endif // defined(OS_CHROMEOS)
} }
void Session::StartWindowManager() { void Session::StartWindowManager() {
...@@ -35,11 +40,5 @@ void Session::StartWindowManager() { ...@@ -35,11 +40,5 @@ void Session::StartWindowManager() {
context()->connector()->StartService(common::GetWindowManagerServiceName()); context()->connector()->StartService(common::GetWindowManagerServiceName());
} }
void Session::StartQuickLaunch() {
// TODO(beng): monitor this service for death & bring down the whole system
// if necessary.
context()->connector()->StartService(quick_launch::mojom::kServiceName);
}
} // namespace session } // namespace session
} // namespace main } // namespace main
...@@ -21,7 +21,6 @@ class Session : public service_manager::Service { ...@@ -21,7 +21,6 @@ class Session : public service_manager::Service {
void OnStart() override; void OnStart() override;
void StartWindowManager(); void StartWindowManager();
void StartQuickLaunch();
DISALLOW_COPY_AND_ASSIGN(Session); DISALLOW_COPY_AND_ASSIGN(Session);
}; };
......
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