chromeos: Remove accessibility autoclick app
Neither the mustash team nor the accessibility team has any concrete plans to ship this. We can always restore it if we change our minds. This eliminates a couple IsAshInBrowserProcess() checks in //ash. Bug: 876115 Test: ash_unittests Change-Id: I60928f52facc4a4d382dff2c4c373d967f203f0a Reviewed-on: https://chromium-review.googlesource.com/1187563 Reviewed-by: Tom Sepez <tsepez@chromium.org> Reviewed-by: Scott Violet <sky@chromium.org> Commit-Queue: James Cook <jamescook@chromium.org> Cr-Commit-Position: refs/heads/master@{#585679}
This commit is contained in:
ash
chrome
app
browser
utility
mash
@ -1343,7 +1343,6 @@ component("ash") {
|
||||
"//ash/app_menu",
|
||||
"//ash/assistant/ui:constants",
|
||||
"//ash/autoclick/common:autoclick",
|
||||
"//ash/components/autoclick/public/mojom",
|
||||
"//ash/components/cursor",
|
||||
"//ash/components/fast_ink",
|
||||
"//ash/components/quick_launch/public/mojom",
|
||||
@ -1434,7 +1433,6 @@ component("ash") {
|
||||
]
|
||||
|
||||
data_deps = [
|
||||
"//ash/components/autoclick:autoclick_app",
|
||||
":dbus_service_files",
|
||||
]
|
||||
|
||||
|
1
ash/DEPS
1
ash/DEPS
@ -53,7 +53,6 @@ include_rules = [
|
||||
"-ash/components",
|
||||
|
||||
# Ash can talk to public interfaces for mini-apps.
|
||||
"+ash/components/autoclick/public",
|
||||
"+ash/components/quick_launch/public",
|
||||
"+ash/components/tap_visualizer/public",
|
||||
|
||||
|
@ -12,7 +12,6 @@
|
||||
#include "ash/accessibility/accessibility_observer.h"
|
||||
#include "ash/accessibility/accessibility_panel_layout_manager.h"
|
||||
#include "ash/autoclick/autoclick_controller.h"
|
||||
#include "ash/components/autoclick/public/mojom/autoclick.mojom.h"
|
||||
#include "ash/high_contrast/high_contrast_controller.h"
|
||||
#include "ash/policy/policy_recommendation_restorer.h"
|
||||
#include "ash/public/cpp/ash_pref_names.h"
|
||||
@ -33,8 +32,6 @@
|
||||
#include "components/prefs/pref_change_registrar.h"
|
||||
#include "components/prefs/pref_registry_simple.h"
|
||||
#include "components/prefs/pref_service.h"
|
||||
#include "mash/public/mojom/launchable.mojom.h"
|
||||
#include "services/service_manager/public/cpp/connector.h"
|
||||
#include "ui/aura/window.h"
|
||||
#include "ui/base/cursor/cursor_type.h"
|
||||
#include "ui/base/l10n/l10n_util.h"
|
||||
@ -236,10 +233,8 @@ AccessibilityPanelLayoutManager* GetLayoutManager() {
|
||||
|
||||
} // namespace
|
||||
|
||||
AccessibilityController::AccessibilityController(
|
||||
service_manager::Connector* connector)
|
||||
: connector_(connector),
|
||||
autoclick_delay_(AutoclickController::GetDefaultAutoclickDelay()) {
|
||||
AccessibilityController::AccessibilityController()
|
||||
: autoclick_delay_(AutoclickController::GetDefaultAutoclickDelay()) {
|
||||
Shell::Get()->session_controller()->AddObserver(this);
|
||||
Shell::Get()->tablet_mode_controller()->AddObserver(this);
|
||||
}
|
||||
@ -858,15 +853,6 @@ void AccessibilityController::UpdateAutoclickFromPref() {
|
||||
|
||||
NotifyAccessibilityStatusChanged();
|
||||
|
||||
if (!features::IsAshInBrowserProcess()) {
|
||||
if (!connector_) // Null in tests.
|
||||
return;
|
||||
mash::mojom::LaunchablePtr launchable;
|
||||
connector_->BindInterface("autoclick_app", &launchable);
|
||||
launchable->Launch(mash::mojom::kWindow, mash::mojom::LaunchMode::DEFAULT);
|
||||
return;
|
||||
}
|
||||
|
||||
Shell::Get()->autoclick_controller()->SetEnabled(enabled);
|
||||
}
|
||||
|
||||
@ -879,15 +865,6 @@ void AccessibilityController::UpdateAutoclickDelayFromPref() {
|
||||
return;
|
||||
autoclick_delay_ = autoclick_delay;
|
||||
|
||||
if (!features::IsAshInBrowserProcess()) {
|
||||
if (!connector_) // Null in tests.
|
||||
return;
|
||||
autoclick::mojom::AutoclickControllerPtr autoclick_controller;
|
||||
connector_->BindInterface("autoclick_app", &autoclick_controller);
|
||||
autoclick_controller->SetAutoclickDelay(autoclick_delay_.InMilliseconds());
|
||||
return;
|
||||
}
|
||||
|
||||
Shell::Get()->autoclick_controller()->SetAutoclickDelay(autoclick_delay_);
|
||||
}
|
||||
|
||||
|
@ -22,10 +22,6 @@ class PrefChangeRegistrar;
|
||||
class PrefRegistrySimple;
|
||||
class PrefService;
|
||||
|
||||
namespace service_manager {
|
||||
class Connector;
|
||||
}
|
||||
|
||||
namespace ash {
|
||||
|
||||
class AccessibilityHighlightController;
|
||||
@ -45,7 +41,7 @@ class ASH_EXPORT AccessibilityController
|
||||
public SessionObserver,
|
||||
public TabletModeObserver {
|
||||
public:
|
||||
explicit AccessibilityController(service_manager::Connector* connector);
|
||||
AccessibilityController();
|
||||
~AccessibilityController() override;
|
||||
|
||||
// See Shell::RegisterProfilePrefs().
|
||||
@ -200,8 +196,6 @@ class ASH_EXPORT AccessibilityController
|
||||
void UpdateVirtualKeyboardFromPref();
|
||||
void UpdateAccessibilityHighlightingFromPrefs();
|
||||
|
||||
service_manager::Connector* connector_ = nullptr;
|
||||
|
||||
// The pref service of the currently active user or the signin profile before
|
||||
// user logs in. Can be null in ash_unittests.
|
||||
PrefService* active_user_prefs_ = nullptr;
|
||||
|
@ -1672,9 +1672,6 @@ This file contains the strings for ash.
|
||||
<message name="IDS_ASH_ASH_SERVICE_NAME" desc="Name of the internal software service that manages windows. Appears in the task manager.">
|
||||
Window manager
|
||||
</message>
|
||||
<message name="IDS_ASH_AUTOCLICK_APP_NAME" desc="Name of the accessibility app that automatically clicks the mouse when it stops moving. Appears in the task manager.">
|
||||
Autoclick
|
||||
</message>
|
||||
<!-- TODO(jamescook): Move next to font service code. -->
|
||||
<message name="IDS_ASH_FONT_SERVICE_NAME" desc="Name of the internal software service that provides fonts. Appears in the task manager.">
|
||||
Font service
|
||||
|
@ -27,6 +27,7 @@ class AutoclickControllerCommonDelegate;
|
||||
// after a certain amout of time at that location.
|
||||
// AutoclickControllerCommon is the common code for both ash and mus to handle
|
||||
// events and to manage autoclick time delay and timer.
|
||||
// TODO(jamescook): Collapse with AutoclickController. https://crbug.com/876115
|
||||
class AutoclickControllerCommon {
|
||||
public:
|
||||
AutoclickControllerCommon(base::TimeDelta delay,
|
||||
|
@ -1,51 +0,0 @@
|
||||
# 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.
|
||||
|
||||
import("//build/config/ui.gni")
|
||||
import("//services/service_manager/public/cpp/service.gni")
|
||||
import("//services/service_manager/public/service_manifest.gni")
|
||||
import("//mojo/public/tools/bindings/mojom.gni")
|
||||
|
||||
source_set("lib") {
|
||||
sources = [
|
||||
"autoclick_application.cc",
|
||||
"autoclick_application.h",
|
||||
]
|
||||
|
||||
deps = [
|
||||
"//ash/autoclick/common:autoclick",
|
||||
"//ash/components/autoclick/public/mojom",
|
||||
"//ash/public/cpp",
|
||||
"//base",
|
||||
"//mash/public/mojom",
|
||||
"//mojo/public/cpp/bindings",
|
||||
"//services/service_manager/public/cpp",
|
||||
"//services/ui/public/cpp",
|
||||
"//services/ws/public/mojom",
|
||||
"//ui/aura",
|
||||
"//ui/views",
|
||||
"//ui/views/mus:for_mojo_application",
|
||||
]
|
||||
}
|
||||
|
||||
service("autoclick_app") {
|
||||
sources = [
|
||||
"main.cc",
|
||||
]
|
||||
|
||||
deps = [
|
||||
":lib",
|
||||
"//base",
|
||||
"//mojo/public/cpp/bindings",
|
||||
"//services/service_manager/public/cpp",
|
||||
"//ui/views/mus:for_mojo_application",
|
||||
]
|
||||
|
||||
resources = [ "$root_out_dir/views_mus_resources.pak" ]
|
||||
}
|
||||
|
||||
service_manifest("manifest") {
|
||||
name = "autoclick_app"
|
||||
source = "manifest.json"
|
||||
}
|
@ -1,6 +0,0 @@
|
||||
include_rules = [
|
||||
"+ash/autoclick/common",
|
||||
"+mash/public/mojom",
|
||||
"+services/ui/public",
|
||||
"+services/ws/public",
|
||||
]
|
@ -1,2 +0,0 @@
|
||||
per-file manifest.json=set noparent
|
||||
per-file manifest.json=file://ipc/SECURITY_OWNERS
|
@ -1,202 +0,0 @@
|
||||
// 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 "ash/components/autoclick/autoclick_application.h"
|
||||
|
||||
#include <utility>
|
||||
|
||||
#include "ash/public/cpp/ash_constants.h"
|
||||
#include "ash/public/cpp/shell_window_ids.h"
|
||||
#include "base/macros.h"
|
||||
#include "base/strings/utf_string_conversions.h"
|
||||
#include "services/service_manager/public/cpp/connector.h"
|
||||
#include "services/service_manager/public/cpp/service_context.h"
|
||||
#include "services/ui/public/cpp/property_type_converters.h"
|
||||
#include "services/ws/public/mojom/constants.mojom.h"
|
||||
#include "services/ws/public/mojom/event_injector.mojom.h"
|
||||
#include "services/ws/public/mojom/window_manager.mojom.h"
|
||||
#include "services/ws/public/mojom/window_tree_constants.mojom.h"
|
||||
#include "ui/aura/mus/property_converter.h"
|
||||
#include "ui/base/ui_base_types.h"
|
||||
#include "ui/display/display.h"
|
||||
#include "ui/display/screen.h"
|
||||
#include "ui/events/base_event_utils.h"
|
||||
#include "ui/views/mus/aura_init.h"
|
||||
#include "ui/views/mus/mus_client.h"
|
||||
#include "ui/views/mus/pointer_watcher_event_router.h"
|
||||
#include "ui/views/pointer_watcher.h"
|
||||
#include "ui/views/widget/widget.h"
|
||||
#include "ui/views/widget/widget_delegate.h"
|
||||
|
||||
namespace autoclick {
|
||||
|
||||
// AutoclickUI handles events to the autoclick app.
|
||||
class AutoclickUI : public views::WidgetDelegateView,
|
||||
public views::PointerWatcher {
|
||||
public:
|
||||
explicit AutoclickUI(
|
||||
ash::AutoclickControllerCommon* autoclick_controller_common)
|
||||
: autoclick_controller_common_(autoclick_controller_common) {
|
||||
views::MusClient::Get()->pointer_watcher_event_router()->AddPointerWatcher(
|
||||
this, true /* want_moves */);
|
||||
}
|
||||
~AutoclickUI() override {
|
||||
views::MusClient::Get()
|
||||
->pointer_watcher_event_router()
|
||||
->RemovePointerWatcher(this);
|
||||
}
|
||||
|
||||
private:
|
||||
// Overridden from views::WidgetDelegate:
|
||||
base::string16 GetWindowTitle() const override {
|
||||
// TODO(beng): use resources.
|
||||
return base::ASCIIToUTF16("Autoclick");
|
||||
}
|
||||
|
||||
// Overridden from views::PointerWatcher:
|
||||
void OnPointerEventObserved(const ui::PointerEvent& event,
|
||||
const gfx::Point& location_in_screen,
|
||||
gfx::NativeView target) override {
|
||||
// AutoclickControllerCommon won't work correctly with a target.
|
||||
DCHECK(!event.target());
|
||||
if (event.IsTouchPointerEvent()) {
|
||||
autoclick_controller_common_->CancelAutoclick();
|
||||
} else if (event.IsMousePointerEvent()) {
|
||||
if (event.type() == ui::ET_POINTER_WHEEL_CHANGED) {
|
||||
autoclick_controller_common_->HandleMouseEvent(
|
||||
ui::MouseWheelEvent(event));
|
||||
} else {
|
||||
ui::MouseEvent mouse_event(event);
|
||||
// AutoclickControllerCommon wants screen coordinates when there isn't a
|
||||
// target.
|
||||
mouse_event.set_location(location_in_screen);
|
||||
autoclick_controller_common_->HandleMouseEvent(mouse_event);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ash::AutoclickControllerCommon* autoclick_controller_common_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(AutoclickUI);
|
||||
};
|
||||
|
||||
AutoclickApplication::AutoclickApplication()
|
||||
: launchable_binding_(this), autoclick_binding_(this) {
|
||||
registry_.AddInterface<mash::mojom::Launchable>(base::BindRepeating(
|
||||
&AutoclickApplication::BindLaunchableRequest, base::Unretained(this)));
|
||||
registry_.AddInterface<mojom::AutoclickController>(
|
||||
base::BindRepeating(&AutoclickApplication::BindAutoclickControllerRequest,
|
||||
base::Unretained(this)));
|
||||
}
|
||||
|
||||
AutoclickApplication::~AutoclickApplication() = default;
|
||||
|
||||
void AutoclickApplication::OnStart() {
|
||||
views::AuraInit::InitParams params;
|
||||
params.connector = context()->connector();
|
||||
params.identity = context()->identity();
|
||||
params.register_path_provider = running_standalone_;
|
||||
aura_init_ = views::AuraInit::Create(params);
|
||||
if (!aura_init_) {
|
||||
context()->QuitNow();
|
||||
return;
|
||||
}
|
||||
autoclick_controller_common_ =
|
||||
std::make_unique<ash::AutoclickControllerCommon>(
|
||||
base::TimeDelta::FromMilliseconds(ash::kDefaultAutoclickDelayMs),
|
||||
this);
|
||||
}
|
||||
|
||||
void AutoclickApplication::OnBindInterface(
|
||||
const service_manager::BindSourceInfo& remote_info,
|
||||
const std::string& interface_name,
|
||||
mojo::ScopedMessagePipeHandle interface_pipe) {
|
||||
registry_.BindInterface(interface_name, std::move(interface_pipe));
|
||||
}
|
||||
|
||||
void AutoclickApplication::Launch(uint32_t what, mash::mojom::LaunchMode how) {
|
||||
if (!widget_) {
|
||||
widget_.reset(new views::Widget);
|
||||
views::Widget::InitParams params(
|
||||
views::Widget::InitParams::TYPE_WINDOW_FRAMELESS);
|
||||
params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW;
|
||||
params.ownership = views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET;
|
||||
params.activatable = views::Widget::InitParams::ACTIVATABLE_NO;
|
||||
params.accept_events = false;
|
||||
params.delegate = new AutoclickUI(autoclick_controller_common_.get());
|
||||
|
||||
params.mus_properties[ui::mojom::WindowManager::kContainerId_InitProperty] =
|
||||
mojo::ConvertTo<std::vector<uint8_t>>(
|
||||
static_cast<int32_t>(ash::kShellWindowId_OverlayContainer));
|
||||
params.show_state = ui::SHOW_STATE_FULLSCREEN;
|
||||
widget_->Init(params);
|
||||
} else {
|
||||
widget_->Close();
|
||||
context()->QuitNow();
|
||||
}
|
||||
}
|
||||
|
||||
void AutoclickApplication::SetAutoclickDelay(uint32_t delay_in_milliseconds) {
|
||||
autoclick_controller_common_->SetAutoclickDelay(
|
||||
base::TimeDelta::FromMilliseconds(delay_in_milliseconds));
|
||||
}
|
||||
|
||||
void AutoclickApplication::BindLaunchableRequest(
|
||||
mash::mojom::LaunchableRequest request) {
|
||||
launchable_binding_.Close();
|
||||
launchable_binding_.Bind(std::move(request));
|
||||
}
|
||||
|
||||
void AutoclickApplication::BindAutoclickControllerRequest(
|
||||
mojom::AutoclickControllerRequest request) {
|
||||
autoclick_binding_.Close();
|
||||
autoclick_binding_.Bind(std::move(request));
|
||||
}
|
||||
|
||||
views::Widget* AutoclickApplication::CreateAutoclickRingWidget(
|
||||
const gfx::Point& point_in_screen) {
|
||||
return widget_.get();
|
||||
}
|
||||
|
||||
void AutoclickApplication::UpdateAutoclickRingWidget(
|
||||
views::Widget* widget,
|
||||
const gfx::Point& point_in_screen) {
|
||||
// Not used in mus.
|
||||
}
|
||||
|
||||
void AutoclickApplication::DoAutoclick(const gfx::Point& point_in_screen,
|
||||
const int mouse_event_flags) {
|
||||
// The window service expects display pixel coordinates for events.
|
||||
display::Display display =
|
||||
display::Screen::GetScreen()->GetDisplayNearestPoint(point_in_screen);
|
||||
gfx::Point point_in_root(point_in_screen);
|
||||
point_in_root -= display.bounds().OffsetFromOrigin();
|
||||
gfx::Point point_in_pixels =
|
||||
gfx::ScaleToFlooredPoint(point_in_root, display.device_scale_factor());
|
||||
|
||||
// Connect to the window service event generation interface.
|
||||
ui::mojom::EventInjectorPtr event_injector;
|
||||
context()->connector()->BindInterface(ui::mojom::kServiceName,
|
||||
&event_injector);
|
||||
|
||||
// Inject a synthetic click.
|
||||
ui::MouseEvent press_event(ui::ET_MOUSE_PRESSED, point_in_pixels,
|
||||
point_in_pixels, ui::EventTimeForNow(),
|
||||
mouse_event_flags | ui::EF_LEFT_MOUSE_BUTTON,
|
||||
ui::EF_LEFT_MOUSE_BUTTON);
|
||||
ui::MouseEvent release_event(ui::ET_MOUSE_RELEASED, point_in_pixels,
|
||||
point_in_pixels, ui::EventTimeForNow(),
|
||||
mouse_event_flags | ui::EF_LEFT_MOUSE_BUTTON,
|
||||
ui::EF_LEFT_MOUSE_BUTTON);
|
||||
event_injector->InjectEventNoAck(
|
||||
display.id(), std::make_unique<ui::PointerEvent>(press_event));
|
||||
event_injector->InjectEventNoAck(
|
||||
display.id(), std::make_unique<ui::PointerEvent>(release_event));
|
||||
}
|
||||
|
||||
void AutoclickApplication::OnAutoclickCanceled() {
|
||||
// Not used in mus.
|
||||
}
|
||||
|
||||
} // namespace autoclick
|
@ -1,82 +0,0 @@
|
||||
// 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 ASH_COMPONENTS_AUTOCLICK_AUTOCLICK_APPLICATION_H_
|
||||
#define ASH_COMPONENTS_AUTOCLICK_AUTOCLICK_APPLICATION_H_
|
||||
|
||||
#include <map>
|
||||
|
||||
#include "ash/autoclick/common/autoclick_controller_common.h"
|
||||
#include "ash/autoclick/common/autoclick_controller_common_delegate.h"
|
||||
#include "ash/components/autoclick/public/mojom/autoclick.mojom.h"
|
||||
#include "base/macros.h"
|
||||
#include "mash/public/mojom/launchable.mojom.h"
|
||||
#include "mojo/public/cpp/bindings/binding.h"
|
||||
#include "services/service_manager/public/cpp/binder_registry.h"
|
||||
#include "services/service_manager/public/cpp/identity.h"
|
||||
#include "services/service_manager/public/cpp/service.h"
|
||||
|
||||
namespace views {
|
||||
class AuraInit;
|
||||
class Widget;
|
||||
} // namespace views
|
||||
|
||||
namespace autoclick {
|
||||
|
||||
// AutoclickApplication is a mojo mini-app that implements the accessibility
|
||||
// autoclick feature. The feature watches for the mouse to stop moving then
|
||||
// generates a click after a short delay.
|
||||
class AutoclickApplication : public service_manager::Service,
|
||||
public mash::mojom::Launchable,
|
||||
public mojom::AutoclickController,
|
||||
public ash::AutoclickControllerCommonDelegate {
|
||||
public:
|
||||
AutoclickApplication();
|
||||
~AutoclickApplication() override;
|
||||
|
||||
void set_running_standalone(bool value) { running_standalone_ = value; }
|
||||
|
||||
private:
|
||||
// service_manager::Service:
|
||||
void OnStart() override;
|
||||
void OnBindInterface(const service_manager::BindSourceInfo& remote_info,
|
||||
const std::string& interface_name,
|
||||
mojo::ScopedMessagePipeHandle interface_pipe) override;
|
||||
|
||||
// mojom::Launchable:
|
||||
void Launch(uint32_t what, mash::mojom::LaunchMode how) override;
|
||||
|
||||
// mojom::AutoclickController:
|
||||
void SetAutoclickDelay(uint32_t delay_in_milliseconds) override;
|
||||
|
||||
void BindLaunchableRequest(mash::mojom::LaunchableRequest request);
|
||||
|
||||
void BindAutoclickControllerRequest(
|
||||
mojom::AutoclickControllerRequest request);
|
||||
|
||||
// ash::AutoclickControllerCommonDelegate:
|
||||
views::Widget* CreateAutoclickRingWidget(
|
||||
const gfx::Point& point_in_screen) override;
|
||||
void UpdateAutoclickRingWidget(views::Widget* widget,
|
||||
const gfx::Point& point_in_screen) override;
|
||||
void DoAutoclick(const gfx::Point& point_in_screen,
|
||||
const int mouse_event_flags) override;
|
||||
void OnAutoclickCanceled() override;
|
||||
|
||||
service_manager::BinderRegistry registry_;
|
||||
mojo::Binding<mash::mojom::Launchable> launchable_binding_;
|
||||
mojo::Binding<mojom::AutoclickController> autoclick_binding_;
|
||||
|
||||
std::unique_ptr<views::AuraInit> aura_init_;
|
||||
std::unique_ptr<ash::AutoclickControllerCommon> autoclick_controller_common_;
|
||||
std::unique_ptr<views::Widget> widget_;
|
||||
|
||||
bool running_standalone_ = false;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(AutoclickApplication);
|
||||
};
|
||||
|
||||
} // namespace autoclick
|
||||
|
||||
#endif // ASH_COMPONENTS_AUTOCLICK_AUTOCLICK_APPLICATION_H_
|
@ -1,14 +0,0 @@
|
||||
// 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 "ash/components/autoclick/autoclick_application.h"
|
||||
#include "services/service_manager/public/c/main.h"
|
||||
#include "services/service_manager/public/cpp/service_runner.h"
|
||||
|
||||
MojoResult ServiceMain(MojoHandle service_request_handle) {
|
||||
autoclick::AutoclickApplication* app = new autoclick::AutoclickApplication;
|
||||
app->set_running_standalone(true);
|
||||
service_manager::ServiceRunner runner(app);
|
||||
return runner.Run(service_request_handle);
|
||||
}
|
@ -1,18 +0,0 @@
|
||||
{
|
||||
"name": "autoclick_app",
|
||||
"display_name": "Autoclick",
|
||||
"sandbox_type": "none",
|
||||
"interface_provider_specs": {
|
||||
"service_manager:connector": {
|
||||
"provides": {
|
||||
"mash:launchable": [ "mash.mojom.Launchable" ],
|
||||
"chromeos:autoclick": [ "autoclick.mojom.AutoclickController" ]
|
||||
},
|
||||
"requires": {
|
||||
"*": [ "app" ],
|
||||
"service_manager": [ "service_manager:service_manager" ],
|
||||
"ui": [ "privileged" ]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -1,11 +0,0 @@
|
||||
# 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.
|
||||
|
||||
import("//mojo/public/tools/bindings/mojom.gni")
|
||||
|
||||
mojom("mojom") {
|
||||
sources = [
|
||||
"autoclick.mojom",
|
||||
]
|
||||
}
|
@ -1,2 +0,0 @@
|
||||
per-file *.mojom=set noparent
|
||||
per-file *.mojom=file://ipc/SECURITY_OWNERS
|
@ -1,11 +0,0 @@
|
||||
// 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.
|
||||
|
||||
module autoclick.mojom;
|
||||
|
||||
// Used by Chrome to set the time to wait in milliseconds from when the mouse
|
||||
// stops moving to when the autoclick event is sent in autoclick_app.
|
||||
interface AutoclickController {
|
||||
SetAutoclickDelay(uint32 delay_in_milliseconds);
|
||||
};
|
@ -63,10 +63,6 @@
|
||||
},
|
||||
"requires": {
|
||||
"*": [ "accessibility", "app" ],
|
||||
"autoclick_app": [
|
||||
"chromeos:autoclick",
|
||||
"mash:launchable"
|
||||
],
|
||||
"ash_pref_connector": [ "pref_connector" ],
|
||||
"catalog": [ "directory" ],
|
||||
"local_state": [ "pref_client" ],
|
||||
|
@ -1038,8 +1038,7 @@ void Shell::Init(
|
||||
accessibility_focus_ring_controller_ =
|
||||
std::make_unique<AccessibilityFocusRingController>();
|
||||
accessibility_delegate_.reset(shell_delegate_->CreateAccessibilityDelegate());
|
||||
accessibility_controller_ =
|
||||
std::make_unique<AccessibilityController>(connector_);
|
||||
accessibility_controller_ = std::make_unique<AccessibilityController>();
|
||||
toast_manager_ = std::make_unique<ToastManager>();
|
||||
|
||||
// Install the custom factory early on so that views::FocusManagers for Tray,
|
||||
|
@ -453,7 +453,6 @@ service_manifest("chrome_content_packaged_services_manifest_overlay") {
|
||||
}
|
||||
if (is_chromeos) {
|
||||
packaged_services += [
|
||||
"//ash/components/autoclick:manifest",
|
||||
"//ash/components/quick_launch:manifest",
|
||||
"//ash/components/shortcut_viewer:manifest",
|
||||
"//ash/components/tap_visualizer:manifest",
|
||||
|
@ -36,7 +36,6 @@ struct Service {
|
||||
|
||||
// Services shared between mash and non-mash configs.
|
||||
constexpr Service kCommonServices[] = {
|
||||
{"autoclick_app", IDS_ASH_AUTOCLICK_APP_NAME},
|
||||
{quick_launch::mojom::kServiceName, IDS_ASH_QUICK_LAUNCH_APP_NAME},
|
||||
{shortcut_viewer::mojom::kServiceName, IDS_ASH_SHORTCUT_VIEWER_APP_NAME},
|
||||
{tap_visualizer::mojom::kServiceName, IDS_ASH_TAP_VISUALIZER_APP_NAME},
|
||||
|
@ -30,7 +30,6 @@
|
||||
},
|
||||
"requires": {
|
||||
"apps": [ "app_registry" ],
|
||||
"autoclick_app": [ "chromeos:autoclick" ],
|
||||
"ash": [ "system_ui", "test", "display" ],
|
||||
// Only used in classic ash case.
|
||||
"ash_pref_connector": [ "pref_connector" ],
|
||||
|
@ -149,7 +149,6 @@ static_library("utility") {
|
||||
]
|
||||
deps += [
|
||||
"//ash",
|
||||
"//ash/components/autoclick:lib",
|
||||
"//ash/components/quick_launch:lib",
|
||||
"//ash/components/quick_launch/public/mojom",
|
||||
"//ash/components/shortcut_viewer:lib",
|
||||
|
@ -52,7 +52,6 @@ include_rules = [
|
||||
specific_include_rules = {
|
||||
"mash_service_factory.cc": [
|
||||
"+ash/ash_service.h",
|
||||
"+ash/components/autoclick/autoclick_application.h",
|
||||
"+ash/components/quick_launch/public",
|
||||
"+ash/components/quick_launch/quick_launch_application.h",
|
||||
"+ash/components/shortcut_viewer/public",
|
||||
|
@ -7,7 +7,6 @@
|
||||
#include <memory>
|
||||
|
||||
#include "ash/ash_service.h"
|
||||
#include "ash/components/autoclick/autoclick_application.h"
|
||||
#include "ash/components/quick_launch/public/mojom/constants.mojom.h"
|
||||
#include "ash/components/quick_launch/quick_launch_application.h"
|
||||
#include "ash/components/shortcut_viewer/public/mojom/shortcut_viewer.mojom.h"
|
||||
@ -26,7 +25,7 @@ namespace {
|
||||
// numeric values should never be reused.
|
||||
enum class MashService {
|
||||
kAsh = 0,
|
||||
kAutoclick = 1,
|
||||
kAutoclickDeprecated = 1, // Deleted Aug 2018, https://crbug.com/876115
|
||||
kQuickLaunch = 2,
|
||||
kShortcutViewer = 3,
|
||||
kTapVisualizer = 4,
|
||||
@ -58,13 +57,6 @@ std::unique_ptr<service_manager::Service> CreateAshService() {
|
||||
return std::make_unique<ash::AshService>();
|
||||
}
|
||||
|
||||
std::unique_ptr<service_manager::Service> CreateAutoclickApp() {
|
||||
RecordMashServiceLaunch(MashService::kAutoclick);
|
||||
// Use an abbreviation of the service name to keep log lines shorter.
|
||||
logging::SetLogPrefix("autoclick");
|
||||
return std::make_unique<autoclick::AutoclickApplication>();
|
||||
}
|
||||
|
||||
std::unique_ptr<service_manager::Service> CreateQuickLaunchApp() {
|
||||
RecordMashServiceLaunch(MashService::kQuickLaunch);
|
||||
logging::SetLogPrefix("quick");
|
||||
@ -95,7 +87,6 @@ void MashServiceFactory::RegisterOutOfProcessServices(
|
||||
RegisterMashService(services, quick_launch::mojom::kServiceName,
|
||||
&CreateQuickLaunchApp);
|
||||
RegisterMashService(services, ash::mojom::kServiceName, &CreateAshService);
|
||||
RegisterMashService(services, "autoclick_app", &CreateAutoclickApp);
|
||||
RegisterMashService(services, shortcut_viewer::mojom::kServiceName,
|
||||
&CreateShortcutViewerApp);
|
||||
RegisterMashService(services, tap_visualizer::mojom::kServiceName,
|
||||
|
@ -24,10 +24,7 @@ group("all") {
|
||||
|
||||
# Build on platforms that support ash.
|
||||
if (is_chromeos) {
|
||||
deps += [
|
||||
"//ash/components/autoclick:autoclick_app",
|
||||
"//ash/components/quick_launch:quick_launch_app",
|
||||
]
|
||||
deps += [ "//ash/components/quick_launch:quick_launch_app" ]
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user