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/top_controls_manager.h" | 5 #include "cc/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 "base/time.h" | 10 #include "base/time.h" |
11 #include "cc/keyframed_animation_curve.h" | 11 #include "cc/animation/keyframed_animation_curve.h" |
12 #include "cc/layer_tree_impl.h" | 12 #include "cc/layer_tree_impl.h" |
13 #include "cc/timing_function.h" | 13 #include "cc/timing_function.h" |
14 #include "cc/top_controls_manager_client.h" | 14 #include "cc/top_controls_manager_client.h" |
15 #include "ui/gfx/transform.h" | 15 #include "ui/gfx/transform.h" |
16 #include "ui/gfx/vector2d_f.h" | 16 #include "ui/gfx/vector2d_f.h" |
17 | 17 |
18 namespace cc { | 18 namespace cc { |
19 namespace { | 19 namespace { |
20 // These constants were chosen empirically for their visually pleasant behavior. | 20 // These constants were chosen empirically for their visually pleasant behavior. |
21 // Contact tedchoc@chromium.org for questions about changing these values. | 21 // Contact tedchoc@chromium.org for questions about changing these values. |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
188 | 188 |
189 if ((animation_direction_ == SHOWING_CONTROLS && new_offset >= 0) || | 189 if ((animation_direction_ == SHOWING_CONTROLS && new_offset >= 0) || |
190 (animation_direction_ == HIDING_CONTROLS | 190 (animation_direction_ == HIDING_CONTROLS |
191 && new_offset <= -top_controls_height_)) { | 191 && new_offset <= -top_controls_height_)) { |
192 return true; | 192 return true; |
193 } | 193 } |
194 return false; | 194 return false; |
195 } | 195 } |
196 | 196 |
197 } // namespace cc | 197 } // namespace cc |
OLD | NEW |