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

Unified Diff: chrome/browser/chromeos/login/wizard_accessibility_handler.cc

Issue 5839003: Fix to enable toggling accessibility using Ctrl+Alt+Z (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years 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/login/wizard_accessibility_handler.cc
===================================================================
--- chrome/browser/chromeos/login/wizard_accessibility_handler.cc (revision 69334)
+++ chrome/browser/chromeos/login/wizard_accessibility_handler.cc (working copy)
@@ -13,7 +13,6 @@
#include "base/string_number_conversions.h"
#include "chrome/browser/accessibility_events.h"
#include "chrome/browser/chromeos/cros/cros_library.h"
-#include "chrome/browser/chromeos/cros/speech_synthesis_library.h"
#include "chrome/browser/extensions/extension_accessibility_api.h"
#include "chrome/browser/extensions/extension_accessibility_api_constants.h"
#include "chrome/browser/profiles/profile_manager.h"
@@ -21,6 +20,9 @@
#include "chrome/common/notification_service.h"
#include "grit/generated_resources.h"
+#include <fstream>
+#include <iostream>
+
namespace keys = extension_accessibility_api_constants;
namespace {
@@ -109,8 +111,32 @@
EarconType earcon = NO_EARCON;
DescribeAccessibilityEvent(type, control_info, &description, &earcon);
Speak(description.c_str(), false, true);
+ std::ofstream st;
+ st.open("/tmp/mydebug.txt", std::ios::app);
+ st << "Will this Play earcon???\n";
+ if (earcon != NO_EARCON) {
+ st << "Playing earcon: " << earcon << "\n";
+ st.close();
+ PlayEarcon(earcon);
+ } else {
+ st.close();
+ }
xiyuan 2010/12/15 22:44:52 /tmp/mydebug.txt is debugging code, right? If so,
}
+void WizardAccessibilityHandler::PlayEarcon(EarconType earcon_type) {
+ std::ofstream st;
+ st.open("/tmp/mydebug.txt", std::ios::app);
+ st << "Is cros loaded???\n";
+ if (chromeos::CrosLibrary::Get()->EnsureLoaded()) {
+ st << "Cros loaded... will play earcon now...\n";
+ st.close();
+ chromeos::CrosLibrary::Get()->GetSpeechSynthesisLibrary()->
+ PlayEarcon(earcon_type);
+ } else {
+ st.close();
+ }
xiyuan 2010/12/15 22:44:52 please clean up the debug code.
+}
+
void WizardAccessibilityHandler::Speak(const char* speak_str,
bool queue,
bool interruptible) {

Powered by Google App Engine
This is Rietveld 408576698