summaryrefslogtreecommitdiffstats
path: root/chrome/browser/accessibility
diff options
context:
space:
mode:
authordtseng@chromium.org <dtseng@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-04-29 02:00:54 +0000
committerdtseng@chromium.org <dtseng@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-04-29 02:00:54 +0000
commitd8be3b40033d408f77c4a11d177adc3e1d700f93 (patch)
tree713f9b3f50228834bac850eedc6d17ae38033ad3 /chrome/browser/accessibility
parent8cd77fbf2a2bce457728712f4f696ad915b0b7b3 (diff)
downloadchromium_src-d8be3b40033d408f77c4a11d177adc3e1d700f93.zip
chromium_src-d8be3b40033d408f77c4a11d177adc3e1d700f93.tar.gz
chromium_src-d8be3b40033d408f77c4a11d177adc3e1d700f93.tar.bz2
Revert "Rename experimental.accessibility to accessibilityPrivate"
This reverts commit 5d76e14014f504a496e111ecf23a433f1bbd5897. Original review: https://codereview.chromium.org/106973003 BUG=362442,278540 TBR=dmazzoni TEST=Manually verify ChromeVox starts on guest mode. NOTRY=true Review URL: https://codereview.chromium.org/258063008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@266737 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/accessibility')
-rw-r--r--chrome/browser/accessibility/accessibility_extension_api.cc28
-rw-r--r--chrome/browser/accessibility/accessibility_extension_api.h24
-rw-r--r--chrome/browser/accessibility/accessibility_extension_apitest.cc3
3 files changed, 27 insertions, 28 deletions
diff --git a/chrome/browser/accessibility/accessibility_extension_api.cc b/chrome/browser/accessibility/accessibility_extension_api.cc
index 2494bbb..85a6d39 100644
--- a/chrome/browser/accessibility/accessibility_extension_api.cc
+++ b/chrome/browser/accessibility/accessibility_extension_api.cc
@@ -14,7 +14,7 @@
#include "chrome/browser/infobars/confirm_infobar_delegate.h"
#include "chrome/browser/infobars/infobar_service.h"
#include "chrome/browser/profiles/profile.h"
-#include "chrome/common/extensions/api/accessibility_private.h"
+#include "chrome/common/extensions/api/experimental_accessibility.h"
#include "components/infobars/core/infobar.h"
#include "content/public/browser/browser_accessibility_state.h"
#include "extensions/browser/event_router.h"
@@ -25,8 +25,8 @@
#include "extensions/common/manifest_handlers/background_info.h"
namespace keys = extension_accessibility_api_constants;
-namespace accessibility_private =
- extensions::api::accessibility_private;
+namespace experimental_accessibility =
+ extensions::api::experimental_accessibility;
// Returns the AccessibilityControlInfo serialized into a JSON string,
// consisting of an array of a single object of type AccessibilityObject,
@@ -129,7 +129,7 @@ void ExtensionAccessibilityEventRouter::OnWindowOpened(
const AccessibilityWindowInfo* info) {
scoped_ptr<base::ListValue> args(ControlInfoToEventArguments(info));
DispatchEvent(info->profile(),
- accessibility_private::OnWindowOpened::kEventName,
+ experimental_accessibility::OnWindowOpened::kEventName,
args.Pass());
}
@@ -139,7 +139,7 @@ void ExtensionAccessibilityEventRouter::OnControlFocused(
info->SerializeToDict(&last_focused_control_dict_);
scoped_ptr<base::ListValue> args(ControlInfoToEventArguments(info));
DispatchEvent(info->profile(),
- accessibility_private::OnControlFocused::kEventName,
+ experimental_accessibility::OnControlFocused::kEventName,
args.Pass());
}
@@ -147,7 +147,7 @@ void ExtensionAccessibilityEventRouter::OnControlAction(
const AccessibilityControlInfo* info) {
scoped_ptr<base::ListValue> args(ControlInfoToEventArguments(info));
DispatchEvent(info->profile(),
- accessibility_private::OnControlAction::kEventName,
+ experimental_accessibility::OnControlAction::kEventName,
args.Pass());
}
@@ -155,7 +155,7 @@ void ExtensionAccessibilityEventRouter::OnTextChanged(
const AccessibilityControlInfo* info) {
scoped_ptr<base::ListValue> args(ControlInfoToEventArguments(info));
DispatchEvent(info->profile(),
- accessibility_private::OnTextChanged::kEventName,
+ experimental_accessibility::OnTextChanged::kEventName,
args.Pass());
}
@@ -163,7 +163,7 @@ void ExtensionAccessibilityEventRouter::OnMenuOpened(
const AccessibilityMenuInfo* info) {
scoped_ptr<base::ListValue> args(ControlInfoToEventArguments(info));
DispatchEvent(info->profile(),
- accessibility_private::OnMenuOpened::kEventName,
+ experimental_accessibility::OnMenuOpened::kEventName,
args.Pass());
}
@@ -171,7 +171,7 @@ void ExtensionAccessibilityEventRouter::OnMenuClosed(
const AccessibilityMenuInfo* info) {
scoped_ptr<base::ListValue> args(ControlInfoToEventArguments(info));
DispatchEvent(info->profile(),
- accessibility_private::OnMenuClosed::kEventName,
+ experimental_accessibility::OnMenuClosed::kEventName,
args.Pass());
}
@@ -183,7 +183,7 @@ void ExtensionAccessibilityEventRouter::OnChromeVoxLoadStateChanged(
event_args->Append(base::Value::CreateBooleanValue(loading));
event_args->Append(base::Value::CreateBooleanValue(make_announcements));
ExtensionAccessibilityEventRouter::DispatchEventToChromeVox(profile,
- accessibility_private::OnChromeVoxLoadStateChanged::kEventName,
+ experimental_accessibility::OnChromeVoxLoadStateChanged::kEventName,
event_args.Pass());
}
@@ -217,7 +217,7 @@ void ExtensionAccessibilityEventRouter::DispatchEvent(
event_router->BroadcastEvent(event.Pass());
}
-bool AccessibilityPrivateSetAccessibilityEnabledFunction::RunImpl() {
+bool AccessibilitySetAccessibilityEnabledFunction::RunImpl() {
bool enabled;
EXTENSION_FUNCTION_VALIDATE(args_->GetBoolean(0, &enabled));
ExtensionAccessibilityEventRouter::GetInstance()
@@ -225,7 +225,7 @@ bool AccessibilityPrivateSetAccessibilityEnabledFunction::RunImpl() {
return true;
}
-bool AccessibilityPrivateSetNativeAccessibilityEnabledFunction::RunImpl() {
+bool AccessibilitySetNativeAccessibilityEnabledFunction::RunImpl() {
bool enabled;
EXTENSION_FUNCTION_VALIDATE(args_->GetBoolean(0, &enabled));
if (enabled) {
@@ -238,7 +238,7 @@ bool AccessibilityPrivateSetNativeAccessibilityEnabledFunction::RunImpl() {
return true;
}
-bool AccessibilityPrivateGetFocusedControlFunction::RunImpl() {
+bool AccessibilityGetFocusedControlFunction::RunImpl() {
// Get the serialized dict from the last focused control and return it.
// However, if the dict is empty, that means we haven't seen any focus
// events yet, so return null instead.
@@ -254,7 +254,7 @@ bool AccessibilityPrivateGetFocusedControlFunction::RunImpl() {
return true;
}
-bool AccessibilityPrivateGetAlertsForTabFunction::RunImpl() {
+bool AccessibilityGetAlertsForTabFunction::RunImpl() {
int tab_id;
EXTENSION_FUNCTION_VALIDATE(args_->GetInteger(0, &tab_id));
diff --git a/chrome/browser/accessibility/accessibility_extension_api.h b/chrome/browser/accessibility/accessibility_extension_api.h
index 3ea1603..c053cd2 100644
--- a/chrome/browser/accessibility/accessibility_extension_api.h
+++ b/chrome/browser/accessibility/accessibility_extension_api.h
@@ -98,42 +98,42 @@ class ExtensionAccessibilityEventRouter {
// API function that enables or disables accessibility support. Event
// listeners are only installed when accessibility support is enabled, to
// minimize the impact.
-class AccessibilityPrivateSetAccessibilityEnabledFunction
+class AccessibilitySetAccessibilityEnabledFunction
: public ChromeSyncExtensionFunction {
- virtual ~AccessibilityPrivateSetAccessibilityEnabledFunction() {}
+ virtual ~AccessibilitySetAccessibilityEnabledFunction() {}
virtual bool RunImpl() OVERRIDE;
DECLARE_EXTENSION_FUNCTION(
- "accessibilityPrivate.setAccessibilityEnabled",
+ "experimental.accessibility.setAccessibilityEnabled",
EXPERIMENTAL_ACCESSIBILITY_SETACCESSIBILITYENABLED)
};
// API function that enables or disables web content accessibility support.
-class AccessibilityPrivateSetNativeAccessibilityEnabledFunction
+class AccessibilitySetNativeAccessibilityEnabledFunction
: public ChromeSyncExtensionFunction {
- virtual ~AccessibilityPrivateSetNativeAccessibilityEnabledFunction() {}
+ virtual ~AccessibilitySetNativeAccessibilityEnabledFunction() {}
virtual bool RunImpl() OVERRIDE;
DECLARE_EXTENSION_FUNCTION(
- "accessibilityPrivate.setNativeAccessibilityEnabled",
+ "experimental.accessibility.setNativeAccessibilityEnabled",
EXPERIMENTAL_ACCESSIBILITY_SETNATIVEACCESSIBILITYENABLED)
};
// API function that returns the most recent focused control.
-class AccessibilityPrivateGetFocusedControlFunction
+class AccessibilityGetFocusedControlFunction
: public ChromeSyncExtensionFunction {
- virtual ~AccessibilityPrivateGetFocusedControlFunction() {}
+ virtual ~AccessibilityGetFocusedControlFunction() {}
virtual bool RunImpl() OVERRIDE;
DECLARE_EXTENSION_FUNCTION(
- "accessibilityPrivate.getFocusedControl",
+ "experimental.accessibility.getFocusedControl",
EXPERIMENTAL_ACCESSIBILITY_GETFOCUSEDCONTROL)
};
// API function that returns alerts being shown on the give tab.
-class AccessibilityPrivateGetAlertsForTabFunction
+class AccessibilityGetAlertsForTabFunction
: public ChromeSyncExtensionFunction {
- virtual ~AccessibilityPrivateGetAlertsForTabFunction() {}
+ virtual ~AccessibilityGetAlertsForTabFunction() {}
virtual bool RunImpl() OVERRIDE;
DECLARE_EXTENSION_FUNCTION(
- "accessibilityPrivate.getAlertsForTab",
+ "experimental.accessibility.getAlertsForTab",
EXPERIMENTAL_ACCESSIBILITY_GETALERTSFORTAB)
};
diff --git a/chrome/browser/accessibility/accessibility_extension_apitest.cc b/chrome/browser/accessibility/accessibility_extension_apitest.cc
index 55a9aa0..7282a76 100644
--- a/chrome/browser/accessibility/accessibility_extension_apitest.cc
+++ b/chrome/browser/accessibility/accessibility_extension_apitest.cc
@@ -38,6 +38,5 @@ IN_PROC_BROWSER_TEST_F(ExtensionApiTest, MAYBE_GetAlertsForTab) {
base::ASCIIToUTF16(kAlertMessage), false);
CommandLine::ForCurrentProcess()->AppendSwitch(
extensions::switches::kEnableExperimentalExtensionApis);
- ASSERT_TRUE(RunComponentExtensionTest("accessibility/get_alerts_for_tab"))
- << message_;
+ ASSERT_TRUE(RunExtensionTest("accessibility/get_alerts_for_tab")) << message_;
}