| 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 <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "cc/animation/keyframed_animation_curve.h" | 10 #include "cc/animation/keyframed_animation_curve.h" |
| 11 #include "cc/animation/timing_function.h" | 11 #include "cc/animation/timing_function.h" |
| 12 #include "cc/input/top_controls_manager_client.h" | 12 #include "cc/input/top_controls_manager_client.h" |
| 13 #include "cc/output/begin_frame_args.h" | 13 #include "cc/output/begin_frame_args.h" |
| 14 #include "cc/trees/layer_tree_impl.h" | 14 #include "cc/trees/layer_tree_impl.h" |
| 15 #include "ui/gfx/frame_time.h" | 15 #include "ui/gfx/frame_time.h" |
| 16 #include "ui/gfx/geometry/vector2d_f.h" |
| 16 #include "ui/gfx/transform.h" | 17 #include "ui/gfx/transform.h" |
| 17 #include "ui/gfx/vector2d_f.h" | |
| 18 | 18 |
| 19 namespace cc { | 19 namespace cc { |
| 20 namespace { | 20 namespace { |
| 21 // These constants were chosen empirically for their visually pleasant behavior. | 21 // These constants were chosen empirically for their visually pleasant behavior. |
| 22 // Contact tedchoc@chromium.org for questions about changing these values. | 22 // Contact tedchoc@chromium.org for questions about changing these values. |
| 23 const int64 kShowHideMaxDurationMs = 200; | 23 const int64 kShowHideMaxDurationMs = 200; |
| 24 } | 24 } |
| 25 | 25 |
| 26 // static | 26 // static |
| 27 scoped_ptr<TopControlsManager> TopControlsManager::Create( | 27 scoped_ptr<TopControlsManager> TopControlsManager::Create( |
| (...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 246 | 246 |
| 247 if ((animation_direction_ == SHOWING_CONTROLS && new_offset >= 0) || | 247 if ((animation_direction_ == SHOWING_CONTROLS && new_offset >= 0) || |
| 248 (animation_direction_ == HIDING_CONTROLS | 248 (animation_direction_ == HIDING_CONTROLS |
| 249 && new_offset <= -top_controls_height_)) { | 249 && new_offset <= -top_controls_height_)) { |
| 250 return true; | 250 return true; |
| 251 } | 251 } |
| 252 return false; | 252 return false; |
| 253 } | 253 } |
| 254 | 254 |
| 255 } // namespace cc | 255 } // namespace cc |
| OLD | NEW |