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/touch_selection/touch_handle.h" | 5 #include "ui/touch_selection/touch_handle.h" |
6 | 6 |
| 7 #include <algorithm> |
7 #include <cmath> | 8 #include <cmath> |
8 | 9 |
9 namespace ui { | 10 namespace ui { |
10 | 11 |
11 namespace { | 12 namespace { |
12 | 13 |
13 // Maximum duration of a fade sequence. | 14 // Maximum duration of a fade sequence. |
14 const double kFadeDurationMs = 200; | 15 const double kFadeDurationMs = 200; |
15 | 16 |
16 // Maximum amount of travel for a fade sequence. This avoids handle "ghosting" | 17 // Maximum amount of travel for a fade sequence. This avoids handle "ghosting" |
(...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
399 drawable_->SetAlpha(alpha); | 400 drawable_->SetAlpha(alpha); |
400 } | 401 } |
401 | 402 |
402 void TouchHandle::SetUpdateLayoutRequired() { | 403 void TouchHandle::SetUpdateLayoutRequired() { |
403 // TODO(AviD): Make the layout call explicit to the caller by adding this in | 404 // TODO(AviD): Make the layout call explicit to the caller by adding this in |
404 // TouchHandleClient. | 405 // TouchHandleClient. |
405 is_handle_layout_update_required_ = true; | 406 is_handle_layout_update_required_ = true; |
406 } | 407 } |
407 | 408 |
408 } // namespace ui | 409 } // namespace ui |
OLD | NEW |