| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/chromeos/input_method/accessibility.h" | 5 #include "chrome/browser/chromeos/input_method/accessibility.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
| 9 #include "chrome/browser/chromeos/input_method/input_method_util.h" | |
| 10 #include "chrome/browser/profiles/profile_manager.h" | 9 #include "chrome/browser/profiles/profile_manager.h" |
| 11 #include "chrome/browser/ui/aura/accessibility/automation_manager_aura.h" | 10 #include "chrome/browser/ui/aura/accessibility/automation_manager_aura.h" |
| 11 #include "ui/base/ime/chromeos/input_method_util.h" |
| 12 | 12 |
| 13 namespace chromeos { | 13 namespace chromeos { |
| 14 namespace input_method { | 14 namespace input_method { |
| 15 | 15 |
| 16 Accessibility::Accessibility(InputMethodManager* imm) | 16 Accessibility::Accessibility(InputMethodManager* imm) |
| 17 : imm_(imm) { | 17 : imm_(imm) { |
| 18 DCHECK(imm_); | 18 DCHECK(imm_); |
| 19 imm_->AddObserver(this); | 19 imm_->AddObserver(this); |
| 20 } | 20 } |
| 21 | 21 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 35 const InputMethodDescriptor descriptor = | 35 const InputMethodDescriptor descriptor = |
| 36 imm_->GetActiveIMEState()->GetCurrentInputMethod(); | 36 imm_->GetActiveIMEState()->GetCurrentInputMethod(); |
| 37 const std::string medium_name = base::UTF16ToUTF8( | 37 const std::string medium_name = base::UTF16ToUTF8( |
| 38 imm_->GetInputMethodUtil()->GetInputMethodMediumName(descriptor)); | 38 imm_->GetInputMethodUtil()->GetInputMethodMediumName(descriptor)); |
| 39 | 39 |
| 40 AutomationManagerAura::GetInstance()->HandleAlert(profile, medium_name); | 40 AutomationManagerAura::GetInstance()->HandleAlert(profile, medium_name); |
| 41 } | 41 } |
| 42 | 42 |
| 43 } // namespace input_method | 43 } // namespace input_method |
| 44 } // namespace chromeos | 44 } // namespace chromeos |
| OLD | NEW |