| Index: chrome/browser/chromeos/accessibility/accessibility_util.cc
|
| diff --git a/chrome/browser/chromeos/accessibility/accessibility_util.cc b/chrome/browser/chromeos/accessibility/accessibility_util.cc
|
| index 8cc231c69695b7d41826f72c8aeefb2223ee7625..182cbb965e4d2d9de04d6ffb2fdb41e91eed101d 100644
|
| --- a/chrome/browser/chromeos/accessibility/accessibility_util.cc
|
| +++ b/chrome/browser/chromeos/accessibility/accessibility_util.cc
|
| @@ -22,15 +22,18 @@
|
| #include "chrome/browser/profiles/profile.h"
|
| #include "chrome/browser/profiles/profile_manager.h"
|
| #include "chrome/browser/speech/extension_api/tts_extension_api_controller.h"
|
| +#include "chrome/browser/ui/singleton_tabs.h"
|
| #include "chrome/common/extensions/extension.h"
|
| #include "chrome/common/extensions/extension_messages.h"
|
| #include "chrome/common/extensions/extension_resource.h"
|
| #include "chrome/common/extensions/user_script.h"
|
| #include "chrome/common/pref_names.h"
|
| +#include "chrome/common/url_constants.h"
|
| #include "content/public/browser/render_process_host.h"
|
| #include "content/public/browser/render_view_host.h"
|
| #include "content/public/browser/web_contents.h"
|
| #include "content/public/browser/web_ui.h"
|
| +#include "googleurl/src/gurl.h"
|
| #include "grit/browser_resources.h"
|
| #include "grit/generated_resources.h"
|
| #include "ui/base/l10n/l10n_util.h"
|
| @@ -193,7 +196,7 @@ void EnableHighContrast(bool enabled) {
|
| #endif
|
| }
|
|
|
| -void SetScreenMagnifier(ScreenMagnifierType type) {
|
| +void SetScreenMagnifier(ash::ScreenMagnifierType type) {
|
| PrefService* pref_service = g_browser_process->local_state();
|
| pref_service->SetString(prefs::kScreenMagnifierType,
|
| ScreenMagnifierNameFromType(type));
|
| @@ -201,9 +204,9 @@ void SetScreenMagnifier(ScreenMagnifierType type) {
|
|
|
| #if defined(USE_ASH)
|
| ash::Shell::GetInstance()->magnification_controller()->SetEnabled(
|
| - type == MAGNIFIER_FULL);
|
| + type == ash::MAGNIFIER_FULL);
|
| ash::Shell::GetInstance()->partial_magnification_controller()->SetEnabled(
|
| - type == MAGNIFIER_PARTIAL);
|
| + type == ash::MAGNIFIER_PARTIAL);
|
| #endif
|
| }
|
|
|
| @@ -256,35 +259,35 @@ bool IsHighContrastEnabled() {
|
| return high_contrast_enabled;
|
| }
|
|
|
| -ScreenMagnifierType GetScreenMagnifierType() {
|
| +ash::ScreenMagnifierType GetScreenMagnifierType() {
|
| if (!g_browser_process)
|
| - return MAGNIFIER_OFF;
|
| + return ash::MAGNIFIER_OFF;
|
|
|
| PrefService* prefs = g_browser_process->local_state();
|
| std::string screen_magnifier_type;
|
| if (!prefs)
|
| - return MAGNIFIER_OFF;
|
| + return ash::MAGNIFIER_OFF;
|
|
|
| return ScreenMagnifierTypeFromName(
|
| prefs->GetString(prefs::kScreenMagnifierType).c_str());
|
| }
|
|
|
| -ScreenMagnifierType ScreenMagnifierTypeFromName(const char type_name[]) {
|
| +ash::ScreenMagnifierType ScreenMagnifierTypeFromName(const char type_name[]) {
|
| if (0 == strcmp(type_name, kScreenMagnifierFull))
|
| - return MAGNIFIER_FULL;
|
| + return ash::MAGNIFIER_FULL;
|
| else if (0 == strcmp(type_name, kScreenMagnifierPartial))
|
| - return MAGNIFIER_PARTIAL;
|
| + return ash::MAGNIFIER_PARTIAL;
|
| else
|
| - return MAGNIFIER_OFF;
|
| + return ash::MAGNIFIER_OFF;
|
| }
|
|
|
| -const char* ScreenMagnifierNameFromType(ScreenMagnifierType type) {
|
| +const char* ScreenMagnifierNameFromType(ash::ScreenMagnifierType type) {
|
| switch (type) {
|
| - case MAGNIFIER_OFF:
|
| + case ash::MAGNIFIER_OFF:
|
| return kScreenMagnifierOff;
|
| - case MAGNIFIER_FULL:
|
| + case ash::MAGNIFIER_FULL:
|
| return kScreenMagnifierFull;
|
| - case MAGNIFIER_PARTIAL:
|
| + case ash::MAGNIFIER_PARTIAL:
|
| return kScreenMagnifierPartial;
|
| }
|
| return kScreenMagnifierOff;
|
| @@ -295,5 +298,10 @@ void MaybeSpeak(const std::string& utterance) {
|
| Speak(utterance);
|
| }
|
|
|
| +void ShowAccessibilityHelp(Browser* browser) {
|
| + GURL url = GURL(chrome::kChromeAccessibilityHelpURL);
|
| + chrome::ShowSingletonTab(browser, url);
|
| +}
|
| +
|
| } // namespace accessibility
|
| } // namespace chromeos
|
|
|