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

Side by Side Diff: chrome/browser/chromeos/input_method/accessibility.cc

Issue 743273002: Various changes required to support ChromeVox Next to read Views and Windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 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 unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/existing_user_controller.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/accessibility/accessibility_events.h" 9 #include "chrome/browser/accessibility/accessibility_events.h"
10 #include "chrome/browser/chromeos/input_method/input_method_util.h" 10 #include "chrome/browser/chromeos/input_method/input_method_util.h"
11 #include "chrome/browser/profiles/profile_manager.h" 11 #include "chrome/browser/profiles/profile_manager.h"
12 #include "chrome/browser/ui/ash/accessibility/automation_manager_ash.h"
12 13
13 namespace chromeos { 14 namespace chromeos {
14 namespace input_method { 15 namespace input_method {
15 16
16 Accessibility::Accessibility(InputMethodManager* imm) 17 Accessibility::Accessibility(InputMethodManager* imm)
17 : imm_(imm) { 18 : imm_(imm) {
18 DCHECK(imm_); 19 DCHECK(imm_);
19 imm_->AddObserver(this); 20 imm_->AddObserver(this);
20 } 21 }
21 22
(...skipping 11 matching lines...) Expand all
33 // Get the medium name of the changed input method (e.g. US, INTL, etc.) 34 // Get the medium name of the changed input method (e.g. US, INTL, etc.)
34 const InputMethodDescriptor descriptor = 35 const InputMethodDescriptor descriptor =
35 imm_->GetActiveIMEState()->GetCurrentInputMethod(); 36 imm_->GetActiveIMEState()->GetCurrentInputMethod();
36 const std::string medium_name = base::UTF16ToUTF8( 37 const std::string medium_name = base::UTF16ToUTF8(
37 imm_->GetInputMethodUtil()->GetInputMethodMediumName(descriptor)); 38 imm_->GetInputMethodUtil()->GetInputMethodMediumName(descriptor));
38 39
39 AccessibilityAlertInfo event(ProfileManager::GetActiveUserProfile(), 40 AccessibilityAlertInfo event(ProfileManager::GetActiveUserProfile(),
40 medium_name); 41 medium_name);
41 SendControlAccessibilityNotification( 42 SendControlAccessibilityNotification(
42 ui::AX_EVENT_ALERT, &event); 43 ui::AX_EVENT_ALERT, &event);
44
45 AutomationManagerAsh::GetInstance()->HandleAlert(
46 ProfileManager::GetActiveUserProfile(), medium_name);
43 } 47 }
44 48
45 } // namespace input_method 49 } // namespace input_method
46 } // namespace chromeos 50 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/existing_user_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698