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/tray/system_tray_notifier.h" | 9 #include "ash/common/system/tray/system_tray_notifier.h" |
10 #include "ash/common/system/tray/tray_details_view.h" | 10 #include "ash/common/system/tray/tray_details_view.h" |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 std::unique_ptr<views::View> detailed_view_; | 51 std::unique_ptr<views::View> detailed_view_; |
52 | 52 |
53 bool keyboard_suppressed_ = false; | 53 bool keyboard_suppressed_ = false; |
54 std::vector<ui::TouchscreenDevice> touchscreen_devices_to_restore_; | 54 std::vector<ui::TouchscreenDevice> touchscreen_devices_to_restore_; |
55 std::vector<ui::InputDevice> keyboard_devices_to_restore_; | 55 std::vector<ui::InputDevice> keyboard_devices_to_restore_; |
56 | 56 |
57 DISALLOW_COPY_AND_ASSIGN(TrayIMETest); | 57 DISALLOW_COPY_AND_ASSIGN(TrayIMETest); |
58 }; | 58 }; |
59 | 59 |
60 void TrayIMETest::SetAccessibilityKeyboardEnabled(bool enabled) { | 60 void TrayIMETest::SetAccessibilityKeyboardEnabled(bool enabled) { |
61 WmShell::Get()->GetAccessibilityDelegate()->SetVirtualKeyboardEnabled( | 61 WmShell::Get()->accessibility_delegate()->SetVirtualKeyboardEnabled(enabled); |
62 enabled); | |
63 keyboard::SetAccessibilityKeyboardEnabled(enabled); | 62 keyboard::SetAccessibilityKeyboardEnabled(enabled); |
64 AccessibilityNotificationVisibility notification = | 63 AccessibilityNotificationVisibility notification = |
65 enabled ? A11Y_NOTIFICATION_SHOW : A11Y_NOTIFICATION_NONE; | 64 enabled ? A11Y_NOTIFICATION_SHOW : A11Y_NOTIFICATION_NONE; |
66 WmShell::Get()->system_tray_notifier()->NotifyAccessibilityModeChanged( | 65 WmShell::Get()->system_tray_notifier()->NotifyAccessibilityModeChanged( |
67 notification); | 66 notification); |
68 } | 67 } |
69 | 68 |
70 void TrayIMETest::SetIMELength(int length) { | 69 void TrayIMETest::SetIMELength(int length) { |
71 tray_->ime_list_.clear(); | 70 tray_->ime_list_.clear(); |
72 IMEInfo ime; | 71 IMEInfo ime; |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 toggle = GetScrollChildView(0); | 172 toggle = GetScrollChildView(0); |
174 // Clicking again should disable the keyboard. | 173 // Clicking again should disable the keyboard. |
175 tap = ui::GestureEvent(0, 0, 0, base::TimeTicks(), | 174 tap = ui::GestureEvent(0, 0, 0, base::TimeTicks(), |
176 ui::GestureEventDetails(ui::ET_GESTURE_TAP)); | 175 ui::GestureEventDetails(ui::ET_GESTURE_TAP)); |
177 toggle->OnGestureEvent(&tap); | 176 toggle->OnGestureEvent(&tap); |
178 EXPECT_FALSE(keyboard::IsKeyboardEnabled()); | 177 EXPECT_FALSE(keyboard::IsKeyboardEnabled()); |
179 EXPECT_TRUE(default_view()->visible()); | 178 EXPECT_TRUE(default_view()->visible()); |
180 } | 179 } |
181 | 180 |
182 } // namespace ash | 181 } // namespace ash |
OLD | NEW |