Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(470)

Unified Diff: chrome/browser/chromeos/accessibility/accessibility_util.cc

Issue 11642014: Re-introduce the partial magnifier (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix the build failure on win_aura Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 faa58f9ba2cfa828ce3117e50900bb4c542067e7..86778d65fc28570a7bdfee37fd3f8bbd9d6c92d3 100644
--- a/chrome/browser/chromeos/accessibility/accessibility_util.cc
+++ b/chrome/browser/chromeos/accessibility/accessibility_util.cc
@@ -50,10 +50,6 @@ using content::RenderViewHost;
namespace chromeos {
namespace accessibility {
-const char kScreenMagnifierOff[] = "";
-const char kScreenMagnifierFull[] = "full";
-const char kScreenMagnifierPartial[] = "partial";
-
// Helper class that directly loads an extension's content scripts into
// all of the frames corresponding to a given RenderViewHost.
class ContentScriptLoader {
@@ -123,10 +119,14 @@ void UpdateChromeOSAccessibilityHistograms() {
IsHighContrastEnabled());
UMA_HISTOGRAM_BOOLEAN("Accessibility.CrosVirtualKeyboard",
IsVirtualKeyboardEnabled());
- if (MagnificationManager::Get())
+ if (MagnificationManager::Get()) {
+ uint32 type = MagnificationManager::Get()->IsMagnifierEnabled() ?
+ MagnificationManager::Get()->GetMagnifierType() : 0;
+ // '0' means magnifier is disabled.
UMA_HISTOGRAM_ENUMERATION("Accessibility.CrosScreenMagnifier",
- MagnificationManager::Get()->GetMagnifierType(),
- 3);
+ type,
+ ash::kMaxMagnifierType + 1);
+ }
}
void Initialize() {
@@ -290,27 +290,6 @@ bool IsVirtualKeyboardEnabled() {
return virtual_keyboard_enabled;
}
-ash::MagnifierType MagnifierTypeFromName(const char type_name[]) {
- if (0 == strcmp(type_name, kScreenMagnifierFull))
- return ash::MAGNIFIER_FULL;
- else if (0 == strcmp(type_name, kScreenMagnifierPartial))
- return ash::MAGNIFIER_PARTIAL;
- else
- return ash::MAGNIFIER_OFF;
-}
-
-const char* ScreenMagnifierNameFromType(ash::MagnifierType type) {
- switch (type) {
- case ash::MAGNIFIER_OFF:
- return kScreenMagnifierOff;
- case ash::MAGNIFIER_FULL:
- return kScreenMagnifierFull;
- case ash::MAGNIFIER_PARTIAL:
- return kScreenMagnifierPartial;
- }
- return kScreenMagnifierOff;
-}
-
void MaybeSpeak(const std::string& utterance) {
if (IsSpokenFeedbackEnabled())
Speak(utterance);

Powered by Google App Engine
This is Rietveld 408576698