Fix to make OOBE update screen speak

BUG=chromium-os:18897
TEST=Turn on accessibility on the OOBE screen by pressing Ctrl+Alt+z.  Continue to the update page.  Ensure that it's spoken.

Review URL: http://codereview.chromium.org/7606021

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@96146 0039d316-1c4b-4281-b951-d872f2087c98
parent d5d1bd64
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
#include <string> #include <string>
#include "base/logging.h"
#include "base/utf_string_conversions.h" #include "base/utf_string_conversions.h"
#include "chrome/browser/chromeos/login/helper.h" #include "chrome/browser/chromeos/login/helper.h"
#include "chrome/browser/chromeos/login/rounded_rect_painter.h" #include "chrome/browser/chromeos/login/rounded_rect_painter.h"
...@@ -240,6 +241,24 @@ void UpdateView::UpdateVisibility() { ...@@ -240,6 +241,24 @@ void UpdateView::UpdateVisibility() {
} else { } else {
throbber_->Stop(); throbber_->Stop();
} }
// Speak the shown label when accessibility is enabled.
const Label* label_spoken(NULL);
if (checking_label_->IsVisible()) {
label_spoken = checking_label_;
} else if (manual_reboot_label_->IsVisible()) {
label_spoken = manual_reboot_label_;
} else if (preparing_updates_label_->IsVisible()) {
label_spoken = preparing_updates_label_;
} else if (installing_updates_label_->IsVisible()) {
label_spoken = installing_updates_label_;
} else {
NOTREACHED();
}
const std::string text =
label_spoken ? WideToUTF8(label_spoken->GetText()) : std::string();
WizardAccessibilityHelper::GetInstance()->MaybeSpeak(text.c_str(), false,
true);
} }
} // namespace chromeos } // namespace chromeos
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