Chromium Code Reviews| 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) { |