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 "ash/autoclick/autoclick_controller.h" | 5 #include "ash/autoclick/autoclick_controller.h" |
6 | 6 |
7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
8 #include "ash/wm/coordinate_conversion.h" | 8 #include "ash/wm/coordinate_conversion.h" |
9 #include "base/timer/timer.h" | 9 #include "base/timer/timer.h" |
10 #include "ui/aura/env.h" | 10 #include "ui/aura/env.h" |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 void OnGestureEvent(ui::GestureEvent* event) override; | 62 void OnGestureEvent(ui::GestureEvent* event) override; |
63 void OnScrollEvent(ui::ScrollEvent* event) override; | 63 void OnScrollEvent(ui::ScrollEvent* event) override; |
64 | 64 |
65 void InitClickTimer(); | 65 void InitClickTimer(); |
66 | 66 |
67 void DoAutoclick(); | 67 void DoAutoclick(); |
68 | 68 |
69 bool enabled_; | 69 bool enabled_; |
70 int delay_ms_; | 70 int delay_ms_; |
71 int mouse_event_flags_; | 71 int mouse_event_flags_; |
72 scoped_ptr<base::Timer> autoclick_timer_; | 72 std::unique_ptr<base::Timer> autoclick_timer_; |
73 // The position in screen coordinates used to determine | 73 // The position in screen coordinates used to determine |
74 // the distance the mouse has moved. | 74 // the distance the mouse has moved. |
75 gfx::Point anchor_location_; | 75 gfx::Point anchor_location_; |
76 | 76 |
77 DISALLOW_COPY_AND_ASSIGN(AutoclickControllerImpl); | 77 DISALLOW_COPY_AND_ASSIGN(AutoclickControllerImpl); |
78 }; | 78 }; |
79 | 79 |
80 | 80 |
81 AutoclickControllerImpl::AutoclickControllerImpl() | 81 AutoclickControllerImpl::AutoclickControllerImpl() |
82 : enabled_(false), | 82 : enabled_(false), |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
204 if (details.dispatcher_destroyed) | 204 if (details.dispatcher_destroyed) |
205 return; | 205 return; |
206 } | 206 } |
207 | 207 |
208 // static. | 208 // static. |
209 AutoclickController* AutoclickController::CreateInstance() { | 209 AutoclickController* AutoclickController::CreateInstance() { |
210 return new AutoclickControllerImpl(); | 210 return new AutoclickControllerImpl(); |
211 } | 211 } |
212 | 212 |
213 } // namespace ash | 213 } // namespace ash |
OLD | NEW |