| 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 "ui/chromeos/touch_exploration_controller.h" | 5 #include "ui/chromeos/touch_exploration_controller.h" |
| 6 | 6 |
| 7 #include "ash/accessibility_delegate.h" | 7 #include "ash/accessibility_delegate.h" |
| 8 #include "ash/shell.h" | 8 #include "ash/shell.h" |
| 9 #include "ash/test/ash_test_base.h" | 9 #include "ash/test/ash_test_base.h" |
| 10 #include "base/test/simple_test_tick_clock.h" | 10 #include "base/test/simple_test_tick_clock.h" |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 | 52 |
| 53 virtual void TearDownOnMainThread() override { | 53 virtual void TearDownOnMainThread() override { |
| 54 SwitchTouchExplorationMode(false); | 54 SwitchTouchExplorationMode(false); |
| 55 root_window_->RemovePreTargetHandler(event_handler_.get()); | 55 root_window_->RemovePreTargetHandler(event_handler_.get()); |
| 56 } | 56 } |
| 57 | 57 |
| 58 void SwitchTouchExplorationMode(bool on) { | 58 void SwitchTouchExplorationMode(bool on) { |
| 59 ash::AccessibilityDelegate* ad = | 59 ash::AccessibilityDelegate* ad = |
| 60 ash::Shell::GetInstance()->accessibility_delegate(); | 60 ash::Shell::GetInstance()->accessibility_delegate(); |
| 61 if (on != ad->IsSpokenFeedbackEnabled()) | 61 if (on != ad->IsSpokenFeedbackEnabled()) |
| 62 ad->ToggleSpokenFeedback(ash::A11Y_NOTIFICATION_NONE); | 62 ad->ToggleSpokenFeedback(ui::A11Y_NOTIFICATION_NONE); |
| 63 } | 63 } |
| 64 | 64 |
| 65 base::TimeDelta Now() { | 65 base::TimeDelta Now() { |
| 66 return base::TimeDelta::FromInternalValue( | 66 return base::TimeDelta::FromInternalValue( |
| 67 simulated_clock_->NowTicks().ToInternalValue()); | 67 simulated_clock_->NowTicks().ToInternalValue()); |
| 68 } | 68 } |
| 69 | 69 |
| 70 ui::GestureDetector::Config gesture_detector_config_; | 70 ui::GestureDetector::Config gesture_detector_config_; |
| 71 base::SimpleTestTickClock* simulated_clock_; | 71 base::SimpleTestTickClock* simulated_clock_; |
| 72 aura::Window* root_window_; | 72 aura::Window* root_window_; |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 242 | 242 |
| 243 // Continuing to move the touch exploration finger should send more mouse | 243 // Continuing to move the touch exploration finger should send more mouse |
| 244 // events. | 244 // events. |
| 245 generator.MoveTouchId(gfx::Point(509, 609), 1); | 245 generator.MoveTouchId(gfx::Point(509, 609), 1); |
| 246 EXPECT_EQ(0, event_handler_->num_touch_events()); | 246 EXPECT_EQ(0, event_handler_->num_touch_events()); |
| 247 EXPECT_TRUE(cursor_client->IsMouseEventsEnabled()); | 247 EXPECT_TRUE(cursor_client->IsMouseEventsEnabled()); |
| 248 EXPECT_FALSE(cursor_client->IsCursorVisible()); | 248 EXPECT_FALSE(cursor_client->IsCursorVisible()); |
| 249 } | 249 } |
| 250 | 250 |
| 251 } // namespace ui | 251 } // namespace ui |
| OLD | NEW |