Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(392)

Side by Side Diff: cc/input/top_controls_manager.cc

Issue 14715002: Tweaks to top controls behavior for fullscreen API support. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | cc/trees/layer_tree_host_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "base/time.h" 10 #include "base/time.h"
11 #include "cc/animation/keyframed_animation_curve.h" 11 #include "cc/animation/keyframed_animation_curve.h"
12 #include "cc/animation/timing_function.h" 12 #include "cc/animation/timing_function.h"
13 #include "cc/input/top_controls_manager_client.h" 13 #include "cc/input/top_controls_manager_client.h"
14 #include "cc/trees/layer_tree_impl.h" 14 #include "cc/trees/layer_tree_impl.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.
22 const int64 kShowHideMaxDurationMs = 175; 22 const int64 kShowHideMaxDurationMs = 200;
23 } 23 }
24 24
25 // static 25 // static
26 scoped_ptr<TopControlsManager> TopControlsManager::Create( 26 scoped_ptr<TopControlsManager> TopControlsManager::Create(
27 TopControlsManagerClient* client, 27 TopControlsManagerClient* client,
28 float top_controls_height, 28 float top_controls_height,
29 float top_controls_show_threshold, 29 float top_controls_show_threshold,
30 float top_controls_hide_threshold) { 30 float top_controls_hide_threshold) {
31 return make_scoped_ptr(new TopControlsManager(client, 31 return make_scoped_ptr(new TopControlsManager(client,
32 top_controls_height, 32 top_controls_height,
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 204
205 if ((animation_direction_ == SHOWING_CONTROLS && new_offset >= 0) || 205 if ((animation_direction_ == SHOWING_CONTROLS && new_offset >= 0) ||
206 (animation_direction_ == HIDING_CONTROLS 206 (animation_direction_ == HIDING_CONTROLS
207 && new_offset <= -top_controls_height_)) { 207 && new_offset <= -top_controls_height_)) {
208 return true; 208 return true;
209 } 209 }
210 return false; 210 return false;
211 } 211 }
212 212
213 } // namespace cc 213 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/trees/layer_tree_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698