Commit 38d4421b authored by Katie D's avatar Katie D Committed by Commit Bot

Rename Autoclick extension to Accessibility Common.

This extension will be used by any ash accessibility feature
which wants some information about the accessibility tree.

This is a pure rename with no functional changes.

AX-Relnotes: n/a
Bug: 960373
Change-Id: I2ca9db321fce6c44dfb374ca3c690986591acd96
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2252037Reviewed-by: default avatarBen Wells <benwells@chromium.org>
Reviewed-by: default avatarScott Violet <sky@chromium.org>
Reviewed-by: default avatarDavid Tseng <dtseng@chromium.org>
Commit-Queue: Katie Dektar <katie@chromium.org>
Cr-Commit-Position: refs/heads/master@{#780890}
parent 2b48383d
...@@ -86,8 +86,8 @@ class ASH_EXPORT AutoclickController ...@@ -86,8 +86,8 @@ class ASH_EXPORT AutoclickController
// The cursor has exited a scroll (up/down/left/right) button. // The cursor has exited a scroll (up/down/left/right) button.
void OnExitedScrollButton(); void OnExitedScrollButton();
// The Autoclick extension has found scrollble bounds at the current scroll // The Accessibility Common extension has found scrollble bounds at the
// point. // current scroll point.
void OnAutoclickScrollableBoundsFound(gfx::Rect& bounds_in_screen); void OnAutoclickScrollableBoundsFound(gfx::Rect& bounds_in_screen);
// Update the bubble menu bounds if necessary to avoid system UI. // Update the bubble menu bounds if necessary to avoid system UI.
......
...@@ -75,7 +75,7 @@ class ASH_PUBLIC_EXPORT AccessibilityControllerClient { ...@@ -75,7 +75,7 @@ class ASH_PUBLIC_EXPORT AccessibilityControllerClient {
// Select-to-Speak is speaking, cancel speaking and move to inactive state. // Select-to-Speak is speaking, cancel speaking and move to inactive state.
virtual void RequestSelectToSpeakStateChange() = 0; virtual void RequestSelectToSpeakStateChange() = 0;
// Requests that the Automatic Clicks extension get the nearest scrollable // Requests that the Accessibility Common extension get the nearest scrollable
// bounds to the given point in screen coordinates. // bounds to the given point in screen coordinates.
virtual void RequestAutoclickScrollableBoundsForPoint( virtual void RequestAutoclickScrollableBoundsForPoint(
gfx::Point& point_in_screen) = 0; gfx::Point& point_in_screen) = 0;
......
...@@ -109,8 +109,8 @@ class AccessibilityPrivateOnSelectToSpeakStateChangedFunction ...@@ -109,8 +109,8 @@ class AccessibilityPrivateOnSelectToSpeakStateChangedFunction
ACCESSIBILITY_PRIVATE_ONSELECTTOSPEAKSTATECHANGED) ACCESSIBILITY_PRIVATE_ONSELECTTOSPEAKSTATECHANGED)
}; };
// API function that is called when the Autoclick extension finds scrollable // API function that is called when the Accessibility Common extension finds
// bounds. // scrollable bounds.
class AccessibilityPrivateOnScrollableBoundsForPointFoundFunction class AccessibilityPrivateOnScrollableBoundsForPointFoundFunction
: public ExtensionFunction { : public ExtensionFunction {
~AccessibilityPrivateOnScrollableBoundsForPointFoundFunction() override {} ~AccessibilityPrivateOnScrollableBoundsForPointFoundFunction() override {}
......
...@@ -348,12 +348,13 @@ AccessibilityManager::AccessibilityManager() { ...@@ -348,12 +348,13 @@ AccessibilityManager::AccessibilityManager() {
base::FilePath resources_path; base::FilePath resources_path;
if (!base::PathService::Get(chrome::DIR_RESOURCES, &resources_path)) if (!base::PathService::Get(chrome::DIR_RESOURCES, &resources_path))
NOTREACHED(); NOTREACHED();
autoclick_extension_loader_ = accessibility_common_extension_loader_ =
base::WrapUnique(new AccessibilityExtensionLoader( base::WrapUnique(new AccessibilityExtensionLoader(
extension_misc::kAutoclickExtensionId, extension_misc::kAccessibilityCommonExtensionId,
resources_path.Append(extension_misc::kAutoclickExtensionPath), resources_path.Append(
extension_misc::kAutoclickManifestFilename, extension_misc::kAccessibilityCommonExtensionPath),
extension_misc::kAutoclickGuestManifestFilename, extension_misc::kAccessibilityCommonManifestFilename,
extension_misc::kAccessibilityCommonGuestManifestFilename,
base::BindRepeating(&AccessibilityManager::PostUnloadAutoclick, base::BindRepeating(&AccessibilityManager::PostUnloadAutoclick,
weak_ptr_factory_.GetWeakPtr()))); weak_ptr_factory_.GetWeakPtr())));
chromevox_loader_ = base::WrapUnique(new AccessibilityExtensionLoader( chromevox_loader_ = base::WrapUnique(new AccessibilityExtensionLoader(
...@@ -704,7 +705,7 @@ void AccessibilityManager::OnAutoclickChanged() { ...@@ -704,7 +705,7 @@ void AccessibilityManager::OnAutoclickChanged() {
ash::prefs::kAccessibilityAutoclickEnabled); ash::prefs::kAccessibilityAutoclickEnabled);
if (enabled) if (enabled)
autoclick_extension_loader_->SetProfile( accessibility_common_extension_loader_->SetProfile(
profile_, base::Closure() /* done_callback */); profile_, base::Closure() /* done_callback */);
if (autoclick_enabled_ == enabled) if (autoclick_enabled_ == enabled)
...@@ -712,13 +713,13 @@ void AccessibilityManager::OnAutoclickChanged() { ...@@ -712,13 +713,13 @@ void AccessibilityManager::OnAutoclickChanged() {
autoclick_enabled_ = enabled; autoclick_enabled_ = enabled;
if (enabled) { if (enabled) {
autoclick_extension_loader_->Load( accessibility_common_extension_loader_->Load(
profile_, base::BindRepeating(&AccessibilityManager::PostLoadAutoclick, profile_, base::BindRepeating(&AccessibilityManager::PostLoadAutoclick,
weak_ptr_factory_.GetWeakPtr())); weak_ptr_factory_.GetWeakPtr()));
// TODO: Construct a delegate to connect Autoclick and its controller in // TODO: Construct a delegate to connect Autoclick and its controller in
// ash. // ash.
} else { } else {
autoclick_extension_loader_->Unload(); accessibility_common_extension_loader_->Unload();
} }
} }
...@@ -737,7 +738,7 @@ void AccessibilityManager::RequestAutoclickScrollableBoundsForPoint( ...@@ -737,7 +738,7 @@ void AccessibilityManager::RequestAutoclickScrollableBoundsForPoint(
kEventName, kEventName,
std::move(event_args)); std::move(event_args));
event_router->DispatchEventWithLazyListener( event_router->DispatchEventWithLazyListener(
extension_misc::kAutoclickExtensionId, std::move(event)); extension_misc::kAccessibilityCommonExtensionId, std::move(event));
} }
void AccessibilityManager::EnableVirtualKeyboard(bool enabled) { void AccessibilityManager::EnableVirtualKeyboard(bool enabled) {
...@@ -1496,12 +1497,12 @@ void AccessibilityManager::PostUnloadSwitchAccess() { ...@@ -1496,12 +1497,12 @@ void AccessibilityManager::PostUnloadSwitchAccess() {
} }
void AccessibilityManager::PostLoadAutoclick() { void AccessibilityManager::PostLoadAutoclick() {
InitializeFocusRings(extension_misc::kAutoclickExtensionId); InitializeFocusRings(extension_misc::kAccessibilityCommonExtensionId);
} }
void AccessibilityManager::PostUnloadAutoclick() { void AccessibilityManager::PostUnloadAutoclick() {
// Clear the accessibility focus ring. // Clear the accessibility focus ring.
RemoveFocusRings(extension_misc::kAutoclickExtensionId); RemoveFocusRings(extension_misc::kAccessibilityCommonExtensionId);
} }
void AccessibilityManager::SetKeyboardListenerExtensionId( void AccessibilityManager::SetKeyboardListenerExtensionId(
......
...@@ -460,7 +460,8 @@ class AccessibilityManager ...@@ -460,7 +460,8 @@ class AccessibilityManager
extensions::ExtensionRegistryObserver> extensions::ExtensionRegistryObserver>
extension_registry_observer_{this}; extension_registry_observer_{this};
std::unique_ptr<AccessibilityExtensionLoader> autoclick_extension_loader_; std::unique_ptr<AccessibilityExtensionLoader>
accessibility_common_extension_loader_;
std::unique_ptr<AccessibilityExtensionLoader> chromevox_loader_; std::unique_ptr<AccessibilityExtensionLoader> chromevox_loader_;
......
...@@ -31,7 +31,7 @@ bool IsComponentExtensionWhitelisted(const std::string& extension_id) { ...@@ -31,7 +31,7 @@ bool IsComponentExtensionWhitelisted(const std::string& extension_id) {
extension_misc::kPdfExtensionId, extension_misc::kPdfExtensionId,
#if defined(OS_CHROMEOS) #if defined(OS_CHROMEOS)
extension_misc::kAssessmentAssistantExtensionId, extension_misc::kAssessmentAssistantExtensionId,
extension_misc::kAutoclickExtensionId, extension_misc::kAccessibilityCommonExtensionId,
extension_misc::kChromeVoxExtensionId, extension_misc::kChromeVoxExtensionId,
extension_misc::kEspeakSpeechSynthesisExtensionId, extension_misc::kEspeakSpeechSynthesisExtensionId,
extension_misc::kGoogleSpeechSynthesisExtensionId, extension_misc::kGoogleSpeechSynthesisExtensionId,
...@@ -111,7 +111,7 @@ bool IsComponentExtensionWhitelisted(int manifest_resource_id) { ...@@ -111,7 +111,7 @@ bool IsComponentExtensionWhitelisted(int manifest_resource_id) {
bool IsComponentExtensionWhitelistedForSignInProfile( bool IsComponentExtensionWhitelistedForSignInProfile(
const std::string& extension_id) { const std::string& extension_id) {
const char* const kAllowed[] = { const char* const kAllowed[] = {
extension_misc::kAutoclickExtensionId, extension_misc::kAccessibilityCommonExtensionId,
extension_misc::kChromeVoxExtensionId, extension_misc::kChromeVoxExtensionId,
extension_misc::kEspeakSpeechSynthesisExtensionId, extension_misc::kEspeakSpeechSynthesisExtensionId,
extension_misc::kGoogleSpeechSynthesisExtensionId, extension_misc::kGoogleSpeechSynthesisExtensionId,
......
...@@ -21,13 +21,13 @@ group("build") { ...@@ -21,13 +21,13 @@ group("build") {
] ]
if (is_chromeos) { if (is_chromeos) {
deps += [ deps += [
":autoclick_guest_manifest", ":accessibility_common_guest_manifest",
":autoclick_manifest", ":accessibility_common_manifest",
":select_to_speak_guest_manifest", ":select_to_speak_guest_manifest",
":select_to_speak_manifest", ":select_to_speak_manifest",
":switch_access_guest_manifest", ":switch_access_guest_manifest",
":switch_access_manifest", ":switch_access_manifest",
"autoclick:build", "accessibility_common:build",
"select_to_speak:build", "select_to_speak:build",
"switch_access:build", "switch_access:build",
] ]
...@@ -60,15 +60,16 @@ template("manifest") { ...@@ -60,15 +60,16 @@ template("manifest") {
} }
} }
manifest("autoclick_manifest") { manifest("accessibility_common_manifest") {
input_file = "autoclick_manifest.json.jinja2" input_file = "accessibility_common_manifest.json.jinja2"
output_file = "$accessibility_out_dir/autoclick_manifest.json" output_file = "$accessibility_out_dir/accessibility_common_manifest.json"
key = "MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQC6SX/t6kDEi9UiG4fULwjbEW1uJmQoiJPtxvSZ/SDH14OjSzmfP6xfE97Hus3EY8uSIMxTHkGaZliGbFbIQXQn6/XwBpQRu2gPlrfz7TWR1Hw6SboBBMOpltM9A2nx+d3jLtz+YtKNYVcHyNil9hXfFeyFe6g5kLHapKb1UO0jo3q3kovo1a1z7uj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9bjydzeZVATWTICHZgXdAYgfgrbGwppYDUjfKoAuJ6bHTvff4nj8aZrY+Y1SwuvqxgHHfiggUgqg+JyeaAdQG+CLdfl1M8An+6H0x/hx0nk0oOJQhu0y1R/SbtnDJ6JASszg/VrTwHIYbzUl6xKHbZ6X41apyLYwKBgQDHKJOeZdxuYj7AsAqFGreuPoAEh0S+2VHHi4rjNz5dC1z7o/8siixfkHg7ONM2hqCKo55XYj4UWtprEFZJ9ohbizHELNzpnTxjdS0cG/VfItml6CDJaUtrkShIx17yGjNi0u/7ywHQ3slJsUXu7CbEcESwEzdoSrsC048dyxBSIwKBgF0141wtxklXcg/LBtldf6q7NbrkCGh0vDd+CEOm/eesRBz5cHbUQKLVKyO60L9HqVBTDm24tW0wzdrP2h7y69oOOOQzEqX4Zgg6Tl9IgZ7/fgbOfjG6P7ATFqWw5rp1O9QJjii6P6/p62P1Bpbvy0kfVO/MpY2iqbkjufxDFtLvAoGBAMC5p4CVGedH82oL8WI1JKLdoIzBSelV7CmqA9E1WIg5wtVRMlIrtB0WdQL6ToppZVpEU6pES8bu1Ibe3GHezL2pyZMJxw3bNuEYN3sIIz7ZPr2qEHBYEMAbTFyBcoPejvOHJO0I2s0BitBhWEeJB0r5Sb8KGYg3KRnnGIvAQh75AoGBANEC/k1umGrnMO3rwHJF7R+aTHzeMnO6oi11pmSnT7eJcF+oi7OwHS3ickU6sGrIb5QmnwCY9ES1qY6mP7N++KQGsdQM2l13MpCn8cBZgrfpQg2slP1dz8LCDW/PB+6MF7qwEHN2afVA2muQaez+q0eXZjMXmGJ3VZIXz/cxBLD6"
} }
manifest("autoclick_guest_manifest") { manifest("accessibility_common_guest_manifest") {
input_file = "autoclick_manifest.json.jinja2" input_file = "accessibility_common_manifest.json.jinja2"
output_file = "$accessibility_out_dir/autoclick_guest_manifest.json" output_file =
"$accessibility_out_dir/accessibility_common_guest_manifest.json"
key = "MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQC6SX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-120,7 +121,7 @@ group("browser_tests") { ...@@ -120,7 +121,7 @@ group("browser_tests") {
testonly = true testonly = true
if (is_chromeos) { if (is_chromeos) {
deps = [ deps = [
"autoclick:browser_tests", "accessibility_common:browser_tests",
"chromevox:browser_tests", "chromevox:browser_tests",
"common:browser_tests", "common:browser_tests",
"select_to_speak:browser_tests", "select_to_speak:browser_tests",
......
...@@ -11,16 +11,17 @@ import("//third_party/closure_compiler/compile_js.gni") ...@@ -11,16 +11,17 @@ import("//third_party/closure_compiler/compile_js.gni")
assert(is_chromeos) assert(is_chromeos)
autoclick_dir = "$root_out_dir/resources/chromeos/accessibility/autoclick" accessibility_common_dir =
"$root_out_dir/resources/chromeos/accessibility/accessibility_common"
group("build") { group("build") {
deps = [ ":autoclick_copied_files" ] deps = [ ":accessibility_common_copied_files" ]
} }
# Instead of setting up copy targets, use a script to copy all files. # Instead of setting up copy targets, use a script to copy all files.
run_jsbundler("autoclick_copied_files") { run_jsbundler("accessibility_common_copied_files") {
mode = "copy" mode = "copy"
dest_dir = autoclick_dir dest_dir = accessibility_common_dir
sources = [ "autoclick.js" ] sources = [ "autoclick.js" ]
rewrite_rules = [ rewrite_rules = [
rebase_path(".", root_build_dir) + ":", rebase_path(".", root_build_dir) + ":",
...@@ -32,25 +33,25 @@ source_set("browser_tests") { ...@@ -32,25 +33,25 @@ source_set("browser_tests") {
testonly = true testonly = true
assert(enable_extensions) assert(enable_extensions)
deps = [ ":autoclick_extjs_tests" ] deps = [ ":accessibility_common_extjs_tests" ]
data = [ data = [
"$root_out_dir/chrome_100_percent.pak", "$root_out_dir/chrome_100_percent.pak",
"$root_out_dir/chrome_200_percent.pak", "$root_out_dir/chrome_200_percent.pak",
"$root_out_dir/locales/en-US.pak", "$root_out_dir/locales/en-US.pak",
"$root_out_dir/resources.pak", "$root_out_dir/resources.pak",
"$root_out_dir/resources/chromeos/accessibility/autoclick/", "$root_out_dir/resources/chromeos/accessibility/accessibility_common/",
"$root_out_dir/test_data/chrome/browser/resources/chromeos/accessibility/autoclick/", "$root_out_dir/test_data/chrome/browser/resources/chromeos/accessibility/accessibility_common/",
# The test uses data from the original location, not the copied one. # The test uses data from the original location, not the copied one.
"//chrome/browser/resources/chromeos/accessibility/autoclick/", "//chrome/browser/resources/chromeos/accessibility/accessibility_common/",
"//chrome/browser/resources/chromeos/accessibility/common/", "//chrome/browser/resources/chromeos/accessibility/common/",
"//ui/webui/resources/js/cr.js", "//ui/webui/resources/js/cr.js",
] ]
data += js2gtest_js_libraries data += js2gtest_js_libraries
} }
js2gtest("autoclick_extjs_tests") { js2gtest("accessibility_common_extjs_tests") {
test_type = "extension" test_type = "extension"
sources = [ "autoclick_test.js" ] sources = [ "autoclick_test.js" ]
gen_include_files = [ gen_include_files = [
...@@ -70,10 +71,10 @@ js2gtest("autoclick_extjs_tests") { ...@@ -70,10 +71,10 @@ js2gtest("autoclick_extjs_tests") {
} }
js_type_check("closure_compile") { js_type_check("closure_compile") {
deps = [ ":autoclick" ] deps = [ ":accessibility_common" ]
} }
js_library("autoclick") { js_library("accessibility_common") {
deps = [] deps = []
externs_list = [ externs_list = [
"$externs_path/accessibility_private.js", "$externs_path/accessibility_private.js",
......
...@@ -37,9 +37,7 @@ class Autoclick { ...@@ -37,9 +37,7 @@ class Autoclick {
} }
/** /**
* Initializes the autoclick extension. * Initializes the AccessibilityCommon extension.
* TODO(crbug.com/978163): Set up listeners for AccessibilityPrivate events
* related to autoclicks.
* @private * @private
*/ */
init_() { init_() {
...@@ -146,5 +144,5 @@ class Autoclick { ...@@ -146,5 +144,5 @@ class Autoclick {
} }
} }
// Initialize the Autoclick extension. // Initialize the AccessibilityCommon extension.
var autoclick = new Autoclick(true /* blink focus rings */); var autoclick = new Autoclick(true /* blink focus rings */);
\ No newline at end of file
...@@ -40,7 +40,7 @@ AutoclickE2ETest = class extends testing.Test { ...@@ -40,7 +40,7 @@ AutoclickE2ETest = class extends testing.Test {
base::Unretained(chromeos::AccessibilityManager::Get()), base::Unretained(chromeos::AccessibilityManager::Get()),
true); true);
chromeos::AccessibilityManager::Get()->EnableAutoclick(true); chromeos::AccessibilityManager::Get()->EnableAutoclick(true);
WaitForExtension(extension_misc::kAutoclickExtensionId, load_cb); WaitForExtension(extension_misc::kAccessibilityCommonExtensionId, load_cb);
`); `);
} }
......
...@@ -33,7 +33,7 @@ var MockAccessibilityPrivate = { ...@@ -33,7 +33,7 @@ var MockAccessibilityPrivate = {
}, },
/** /**
* Called when Autoclick finds scrollable bounds at a point. * Called when AccessibilityCommon finds scrollable bounds at a point.
* @param {!chrome.accessibilityPrivate.ScreenRect} bounds * @param {!chrome.accessibilityPrivate.ScreenRect} bounds
*/ */
onScrollableBoundsForPointFound: (bounds) => { onScrollableBoundsForPointFound: (bounds) => {
...@@ -42,8 +42,8 @@ var MockAccessibilityPrivate = { ...@@ -42,8 +42,8 @@ var MockAccessibilityPrivate = {
}, },
/** /**
* Called when Autoclick wants to set the focus rings. We can assume that * Called when AccessibilityCommon wants to set the focus rings. We can assume
* it is only setting one set of rings at a time, and safely extract * that it is only setting one set of rings at a time, and safely extract
* focusRingInfos[0].rects. * focusRingInfos[0].rects.
* @param {!Array<!FocusRingInfo>} focusRingInfos * @param {!Array<!FocusRingInfo>} focusRingInfos
*/ */
...@@ -54,9 +54,9 @@ var MockAccessibilityPrivate = { ...@@ -54,9 +54,9 @@ var MockAccessibilityPrivate = {
// Methods for testing. // // Methods for testing. //
/** /**
* Called to get the autoclick extension to use the Automation API to find * Called to get the AccessibilityCommon extension to use the Automation API
* the scrollable bounds at a point. In Automatic Clicks, this would actually * to find the scrollable bounds at a point. In Automatic Clicks, this would
* be initiated by ash/autoclick/autoclick_controller calling the * actually be initiated by ash/autoclick/autoclick_controller calling the
* AccessibilityPrivate API call. * AccessibilityPrivate API call.
* When the bounds are found, onScrollableBoundsForPointFoundCallback will * When the bounds are found, onScrollableBoundsForPointFoundCallback will
* be called to inform the test that work is complete. * be called to inform the test that work is complete.
...@@ -72,7 +72,8 @@ var MockAccessibilityPrivate = { ...@@ -72,7 +72,8 @@ var MockAccessibilityPrivate = {
}, },
/** /**
* Gets the scrollable bounds which were found by the Autoclick extension. * Gets the scrollable bounds which were found by the AccessibilityCommon
* extension.
* @return {Array<!chrome.AccessibilityPrivate.ScreenRect>} * @return {Array<!chrome.AccessibilityPrivate.ScreenRect>}
*/ */
getScrollableBounds: () => { getScrollableBounds: () => {
...@@ -80,7 +81,8 @@ var MockAccessibilityPrivate = { ...@@ -80,7 +81,8 @@ var MockAccessibilityPrivate = {
}, },
/** /**
* Gets the focus rings bounds which were set by the Autoclick extension. * Gets the focus rings bounds which were set by the AccessibilityCommon
* extension.
* @return {Array<!chrome.AccessibilityPrivate.ScreenRect>} * @return {Array<!chrome.AccessibilityPrivate.ScreenRect>}
*/ */
getFocusRings: () => { getFocusRings: () => {
......
...@@ -3,15 +3,15 @@ ...@@ -3,15 +3,15 @@
"key": "{{key}}", "key": "{{key}}",
{% endif %} {% endif %}
"manifest_version": 2, "manifest_version": 2,
"name": "Automatic Clicks", "name": "Accessibility Common",
"version": "{{set_version}}", "version": "{{set_version}}",
"description": "Automatic clicks extension to communicate with the Automation API", "description": "Accessibility Common extension to communicate with the Automation API",
{% if is_guest_manifest == '1' %} {% if is_guest_manifest == '1' %}
"incognito": "split", "incognito": "split",
{% endif %} {% endif %}
"background": { "background": {
"scripts": [ "scripts": [
"autoclick/autoclick.js" "accessibility_common/autoclick.js"
] ]
}, },
"permissions": [ "permissions": [
......
...@@ -387,7 +387,7 @@ ...@@ -387,7 +387,7 @@
{ {
"name": "onScrollableBoundsForPointFound", "name": "onScrollableBoundsForPointFound",
"type": "function", "type": "function",
"description": "Called by the Autoclick extension when findScrollableBoundsForPoint has found a scrolling container. |rect| will be the bounds of the nearest scrollable ancestor of the node at the point requested using findScrollableBoundsForPoint.", "description": "Called by the Accessibility Common extension when findScrollableBoundsForPoint has found a scrolling container. |rect| will be the bounds of the nearest scrollable ancestor of the node at the point requested using findScrollableBoundsForPoint.",
"parameters": [ "parameters": [
{ {
"name": "rect", "name": "rect",
......
...@@ -71,7 +71,7 @@ const char* const kBuiltInFirstPartyExtensionIds[] = { ...@@ -71,7 +71,7 @@ const char* const kBuiltInFirstPartyExtensionIds[] = {
kMediaRouterStableExtensionId, kMediaRouterStableExtensionId,
#if defined(OS_CHROMEOS) #if defined(OS_CHROMEOS)
kAssessmentAssistantExtensionId, kAssessmentAssistantExtensionId,
kAutoclickExtensionId, kAccessibilityCommonExtensionId,
kSelectToSpeakExtensionId, kSelectToSpeakExtensionId,
kSwitchAccessExtensionId, kSwitchAccessExtensionId,
kFilesManagerAppId, kFilesManagerAppId,
...@@ -87,10 +87,13 @@ const char* const kBuiltInFirstPartyExtensionIds[] = { ...@@ -87,10 +87,13 @@ const char* const kBuiltInFirstPartyExtensionIds[] = {
#if defined(OS_CHROMEOS) #if defined(OS_CHROMEOS)
const char kAssessmentAssistantExtensionId[] = const char kAssessmentAssistantExtensionId[] =
"gndmhdcefbhlchkhipcnnbkcmicncehk"; "gndmhdcefbhlchkhipcnnbkcmicncehk";
const char kAutoclickExtensionId[] = "egfdjlfmgnehecnclamagfafdccgfndp"; const char kAccessibilityCommonExtensionId[] =
const char kAutoclickExtensionPath[] = "chromeos/accessibility"; "egfdjlfmgnehecnclamagfafdccgfndp";
const char kAutoclickManifestFilename[] = "autoclick_manifest.json"; const char kAccessibilityCommonExtensionPath[] = "chromeos/accessibility";
const char kAutoclickGuestManifestFilename[] = "autoclick_manifest_guest.json"; const char kAccessibilityCommonManifestFilename[] =
"accessibility_common_manifest.json";
const char kAccessibilityCommonGuestManifestFilename[] =
"accessibility_common_manifest_guest.json";
const char kChromeVoxExtensionPath[] = "chromeos/accessibility"; const char kChromeVoxExtensionPath[] = "chromeos/accessibility";
const char kChromeVoxManifestFilename[] = "chromevox_manifest.json"; const char kChromeVoxManifestFilename[] = "chromevox_manifest.json";
const char kChromeVoxGuestManifestFilename[] = "chromevox_manifest_guest.json"; const char kChromeVoxGuestManifestFilename[] = "chromevox_manifest_guest.json";
......
...@@ -188,15 +188,15 @@ enum AppLaunchBucket { ...@@ -188,15 +188,15 @@ enum AppLaunchBucket {
#if defined(OS_CHROMEOS) #if defined(OS_CHROMEOS)
// The extension id of the Assessment Assistant extension. // The extension id of the Assessment Assistant extension.
extern const char kAssessmentAssistantExtensionId[]; extern const char kAssessmentAssistantExtensionId[];
// The extension id of the Automatic Clicks extension. // The extension id of the Accessibility Common extension.
extern const char kAutoclickExtensionId[]; extern const char kAccessibilityCommonExtensionId[];
// Path to preinstalled Automatic Clicks extension (relative to // Path to preinstalled Accessibility Common extension (relative to
// |chrome::DIR_RESOURCES|). // |chrome::DIR_RESOURCES|).
extern const char kAutoclickExtensionPath[]; extern const char kAccessibilityCommonExtensionPath[];
// The manifest filename of the Automatic Clicks extension. // The manifest filename of the Accessibility Common extension.
extern const char kAutoclickManifestFilename[]; extern const char kAccessibilityCommonManifestFilename[];
// The guest manifest filename of the Automatic Clicks extension. // The guest manifest filename of the Accessibility Common extension.
extern const char kAutoclickGuestManifestFilename[]; extern const char kAccessibilityCommonGuestManifestFilename[];
// Path to preinstalled ChromeVox screen reader extension (relative to // Path to preinstalled ChromeVox screen reader extension (relative to
// |chrome::DIR_RESOURCES|). // |chrome::DIR_RESOURCES|).
extern const char kChromeVoxExtensionPath[]; extern const char kChromeVoxExtensionPath[];
......
...@@ -46,7 +46,7 @@ ash/autoclick/ ...@@ -46,7 +46,7 @@ ash/autoclick/
ash/system/accessibility/autoclick* ash/system/accessibility/autoclick*
- A component extension to provide Accessibility tree information, in - A component extension to provide Accessibility tree information, in
chrome/browser/resources/chromeos/accessibility/autoclick/ chrome/browser/resources/chromeos/accessibility/accessibility_common/
In addition, there are settings for automatic clicks in In addition, there are settings for automatic clicks in
chrome/browser/resources/settings/a11y_page/manage_a11y_page.* chrome/browser/resources/settings/a11y_page/manage_a11y_page.*
...@@ -64,15 +64,15 @@ out/Release/browser_tests --gtest_filter=”Autoclick*” ...@@ -64,15 +64,15 @@ out/Release/browser_tests --gtest_filter=”Autoclick*”
### Debugging ### Debugging
Developers can add log lines to any of the autoclick C++ files and see output Developers can add log lines to any of the autoclick C++ files and see output
in the console. To debug the Autoclick extension, the easiest way is from an in the console. To debug the Accessibility Common extension, the easiest way is
external browser. Start Chrome OS on Linux with this command-line flag: from an external browser. Start Chrome OS on Linux with this command-line flag:
``` ```
out/Release/chrome --remote-debugging-port=9222 out/Release/chrome --remote-debugging-port=9222
``` ```
Now open http://localhost:9222 in a separate instance of the browser, and debug Now open http://localhost:9222 in a separate instance of the browser, and debug
the Autoclick extension background page from there. the Accessibility Common extension background page from there.
## How it works ## How it works
...@@ -132,16 +132,16 @@ may dwell anywhere on the screen to change the scroll location. ...@@ -132,16 +132,16 @@ may dwell anywhere on the screen to change the scroll location.
When the scroll location is changed, the AutoclickController will request the When the scroll location is changed, the AutoclickController will request the
bounds of the nearest scrollable view from the Autoclick component extension bounds of the nearest scrollable view from the Accessibility Common extension
via the AccessibilityPrivate API. The Autoclick component extension has access via the AccessibilityPrivate API. The Accessibility Common component extension
to accessibility tree information, and using a HitTest is able to find the view has access to accessibility tree information, and using a HitTest is able to
at the scroll location, then walks up the tree to find the first view which can find the view at the scroll location, then walks up the tree to find the first
scroll, or stops at the nearest window or dialog bounds. This logic takes place view which can scroll, or stops at the nearest window or dialog bounds. This
in autoclick.js, onAutomationHitTestResult_. When the scrolling location is logic takes place in autoclick.js, onAutomationHitTestResult_. When the
found, the bounds of the scrollable area are highlighted with a focus ring. scrolling location is found, the bounds of the scrollable area are highlighted
In addition, the bounds are sent back through the AccessibilityPrivate API, with a focus ring. In addition, the bounds are sent back through the
routed to the AutoclickController, which passes it via the AccessibilityPrivate API, routed to the AutoclickController, which passes it via
AutoclickMenuBubbleController to the AutoclickScrollBubbleController, which the AutoclickMenuBubbleController to the AutoclickScrollBubbleController, which
does layout accordingly. does layout accordingly.
### Bubble Menus: interface and positioning ### Bubble Menus: interface and positioning
...@@ -175,7 +175,7 @@ UI. ...@@ -175,7 +175,7 @@ UI.
The scroll bubble starts out anchored to the automatic clicks bubble menu, but The scroll bubble starts out anchored to the automatic clicks bubble menu, but
if the user selects a new scroll point it will move. When a scroll point is if the user selects a new scroll point it will move. When a scroll point is
selected, if the scrollable region found by the Autoclick component extension selected, if the scrollable region found by the Accessibility Common extension
is large enough, the scroll bubble will be anchored near the scroll point is large enough, the scroll bubble will be anchored near the scroll point
itself, similarly to the way the context menu is anchored near the cursor on itself, similarly to the way the context menu is anchored near the cursor on
a right click. When the scrollable region is small, the scroll bubble will be a right click. When the scrollable region is small, the scroll bubble will be
......
...@@ -296,9 +296,9 @@ chrome.accessibilityPrivate.sendSyntheticMouseEvent = function(mouseEvent) {}; ...@@ -296,9 +296,9 @@ chrome.accessibilityPrivate.sendSyntheticMouseEvent = function(mouseEvent) {};
chrome.accessibilityPrivate.onSelectToSpeakStateChanged = function(state) {}; chrome.accessibilityPrivate.onSelectToSpeakStateChanged = function(state) {};
/** /**
* Called by the Autoclick extension when findScrollableBoundsForPoint has found * Called by the Accessibility Common extension when findScrollableBoundsForPoint
* a scrolling container. |rect| will be the bounds of the nearest scrollable * has found a scrolling container. |rect| will be the bounds of the nearest
* ancestor of the node at the point requested using * scrollable ancestor of the node at the point requested using
* findScrollableBoundsForPoint. * findScrollableBoundsForPoint.
* @param {!chrome.accessibilityPrivate.ScreenRect} rect * @param {!chrome.accessibilityPrivate.ScreenRect} rect
*/ */
......
...@@ -1220,11 +1220,11 @@ class MetaBuildWrapper(object): ...@@ -1220,11 +1220,11 @@ class MetaBuildWrapper(object):
'chromevox_test_data/', 'chromevox_test_data/',
'gen/ui/file_manager/file_manager/', 'gen/ui/file_manager/file_manager/',
'resources/chromeos/', 'resources/chromeos/',
'resources/chromeos/accessibility/autoclick/', 'resources/chromeos/accessibility/accessibility_common/',
'resources/chromeos/accessibility/chromevox/', 'resources/chromeos/accessibility/chromevox/',
'resources/chromeos/accessibility/select_to_speak/', 'resources/chromeos/accessibility/select_to_speak/',
'test_data/chrome/browser/resources/chromeos/accessibility/' 'test_data/chrome/browser/resources/chromeos/accessibility/'
'autoclick/', 'accessibility_common/',
'test_data/chrome/browser/resources/chromeos/accessibility/' 'test_data/chrome/browser/resources/chromeos/accessibility/'
'chromevox/', 'chromevox/',
'test_data/chrome/browser/resources/chromeos/accessibility/' 'test_data/chrome/browser/resources/chromeos/accessibility/'
......
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