| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "ash/common/system/ime/tray_ime_chromeos.h" | 5 #include "ash/common/system/ime/tray_ime_chromeos.h" |
| 6 | 6 |
| 7 #include "ash/common/accessibility_delegate.h" | 7 #include "ash/common/accessibility_delegate.h" |
| 8 #include "ash/common/accessibility_types.h" | 8 #include "ash/common/accessibility_types.h" |
| 9 #include "ash/common/system/chromeos/ime_menu/ime_list_view.h" | 9 #include "ash/common/system/chromeos/ime_menu/ime_list_view.h" |
| 10 #include "ash/common/system/tray/system_tray_notifier.h" | 10 #include "ash/common/system/tray/system_tray_notifier.h" |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 | 58 |
| 59 DISALLOW_COPY_AND_ASSIGN(TrayIMETest); | 59 DISALLOW_COPY_AND_ASSIGN(TrayIMETest); |
| 60 }; | 60 }; |
| 61 | 61 |
| 62 void TrayIMETest::SetAccessibilityKeyboardEnabled(bool enabled) { | 62 void TrayIMETest::SetAccessibilityKeyboardEnabled(bool enabled) { |
| 63 Shell::GetInstance()->accessibility_delegate()->SetVirtualKeyboardEnabled( | 63 Shell::GetInstance()->accessibility_delegate()->SetVirtualKeyboardEnabled( |
| 64 enabled); | 64 enabled); |
| 65 keyboard::SetAccessibilityKeyboardEnabled(enabled); | 65 keyboard::SetAccessibilityKeyboardEnabled(enabled); |
| 66 AccessibilityNotificationVisibility notification = | 66 AccessibilityNotificationVisibility notification = |
| 67 enabled ? A11Y_NOTIFICATION_SHOW : A11Y_NOTIFICATION_NONE; | 67 enabled ? A11Y_NOTIFICATION_SHOW : A11Y_NOTIFICATION_NONE; |
| 68 WmShell::Get()->system_tray_notifier()->NotifyAccessibilityModeChanged( | 68 Shell::Get()->system_tray_notifier()->NotifyAccessibilityModeChanged( |
| 69 notification); | 69 notification); |
| 70 } | 70 } |
| 71 | 71 |
| 72 void TrayIMETest::SetIMELength(int length) { | 72 void TrayIMETest::SetIMELength(int length) { |
| 73 tray_->ime_list_.clear(); | 73 tray_->ime_list_.clear(); |
| 74 IMEInfo ime; | 74 IMEInfo ime; |
| 75 for (int i = 0; i < length; i++) { | 75 for (int i = 0; i < length; i++) { |
| 76 tray_->ime_list_.push_back(ime); | 76 tray_->ime_list_.push_back(ime); |
| 77 } | 77 } |
| 78 tray_->Update(); | 78 tray_->Update(); |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 // Clicking again should disable the keyboard. | 197 // Clicking again should disable the keyboard. |
| 198 toggle = GetToggleView(); | 198 toggle = GetToggleView(); |
| 199 tap = ui::GestureEvent(0, 0, 0, base::TimeTicks(), | 199 tap = ui::GestureEvent(0, 0, 0, base::TimeTicks(), |
| 200 ui::GestureEventDetails(ui::ET_GESTURE_TAP)); | 200 ui::GestureEventDetails(ui::ET_GESTURE_TAP)); |
| 201 toggle->OnGestureEvent(&tap); | 201 toggle->OnGestureEvent(&tap); |
| 202 EXPECT_FALSE(keyboard::IsKeyboardEnabled()); | 202 EXPECT_FALSE(keyboard::IsKeyboardEnabled()); |
| 203 EXPECT_TRUE(default_view()->visible()); | 203 EXPECT_TRUE(default_view()->visible()); |
| 204 } | 204 } |
| 205 | 205 |
| 206 } // namespace ash | 206 } // namespace ash |
| OLD | NEW |