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 "cc/input/top_controls_manager.h" | 5 #include "cc/input/top_controls_manager.h" |
6 | 6 |
| 7 #include <stdint.h> |
| 8 |
7 #include <algorithm> | 9 #include <algorithm> |
8 | 10 |
9 #include "base/logging.h" | 11 #include "base/logging.h" |
10 #include "cc/animation/keyframed_animation_curve.h" | 12 #include "cc/animation/keyframed_animation_curve.h" |
11 #include "cc/animation/timing_function.h" | 13 #include "cc/animation/timing_function.h" |
12 #include "cc/input/top_controls_manager_client.h" | 14 #include "cc/input/top_controls_manager_client.h" |
13 #include "cc/output/begin_frame_args.h" | 15 #include "cc/output/begin_frame_args.h" |
14 #include "cc/trees/layer_tree_impl.h" | 16 #include "cc/trees/layer_tree_impl.h" |
15 #include "ui/gfx/geometry/vector2d_f.h" | 17 #include "ui/gfx/geometry/vector2d_f.h" |
16 #include "ui/gfx/transform.h" | 18 #include "ui/gfx/transform.h" |
17 | 19 |
18 namespace cc { | 20 namespace cc { |
19 namespace { | 21 namespace { |
20 // These constants were chosen empirically for their visually pleasant behavior. | 22 // These constants were chosen empirically for their visually pleasant behavior. |
21 // Contact tedchoc@chromium.org for questions about changing these values. | 23 // Contact tedchoc@chromium.org for questions about changing these values. |
22 const int64 kShowHideMaxDurationMs = 200; | 24 const int64_t kShowHideMaxDurationMs = 200; |
23 } | 25 } |
24 | 26 |
25 // static | 27 // static |
26 scoped_ptr<TopControlsManager> TopControlsManager::Create( | 28 scoped_ptr<TopControlsManager> TopControlsManager::Create( |
27 TopControlsManagerClient* client, | 29 TopControlsManagerClient* client, |
28 float top_controls_show_threshold, | 30 float top_controls_show_threshold, |
29 float top_controls_hide_threshold) { | 31 float top_controls_hide_threshold) { |
30 return make_scoped_ptr(new TopControlsManager(client, | 32 return make_scoped_ptr(new TopControlsManager(client, |
31 top_controls_show_threshold, | 33 top_controls_show_threshold, |
32 top_controls_hide_threshold)); | 34 top_controls_hide_threshold)); |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
233 } | 235 } |
234 return false; | 236 return false; |
235 } | 237 } |
236 | 238 |
237 void TopControlsManager::ResetBaseline() { | 239 void TopControlsManager::ResetBaseline() { |
238 accumulated_scroll_delta_ = 0.f; | 240 accumulated_scroll_delta_ = 0.f; |
239 baseline_content_offset_ = ContentTopOffset(); | 241 baseline_content_offset_ = ContentTopOffset(); |
240 } | 242 } |
241 | 243 |
242 } // namespace cc | 244 } // namespace cc |
OLD | NEW |