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

Side by Side Diff: cc/top_controls_manager.h

Issue 11967015: Hide location bar on WebKit programmatic scroll. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove some plumbing. Created 7 years, 9 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
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 #ifndef CC_TOP_CONTROLS_MANAGER_H_ 5 #ifndef CC_TOP_CONTROLS_MANAGER_H_
6 #define CC_TOP_CONTROLS_MANAGER_H_ 6 #define CC_TOP_CONTROLS_MANAGER_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "cc/layer_impl.h" 10 #include "cc/layer_impl.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 AnimationDirection animation_direction() { return animation_direction_; } 50 AnimationDirection animation_direction() { return animation_direction_; }
51 51
52 void enable_hiding_top_controls(bool enable) { enable_hiding_ = enable; } 52 void enable_hiding_top_controls(bool enable) { enable_hiding_ = enable; }
53 53
54 void ScrollBegin(); 54 void ScrollBegin();
55 gfx::Vector2dF ScrollBy(const gfx::Vector2dF pending_delta); 55 gfx::Vector2dF ScrollBy(const gfx::Vector2dF pending_delta);
56 void ScrollEnd(); 56 void ScrollEnd();
57 57
58 void Animate(base::TimeTicks monotonic_time); 58 void Animate(base::TimeTicks monotonic_time);
59 59
60 void HideTopControls();
61
60 protected: 62 protected:
61 TopControlsManager(TopControlsManagerClient* client, 63 TopControlsManager(TopControlsManagerClient* client,
62 float top_controls_height, 64 float top_controls_height,
63 float top_controls_show_threshold, 65 float top_controls_show_threshold,
64 float top_controls_hide_threshold); 66 float top_controls_hide_threshold);
65 67
66 private: 68 private:
67 gfx::Vector2dF ScrollInternal(const gfx::Vector2dF pending_delta); 69 gfx::Vector2dF ScrollInternal(const gfx::Vector2dF pending_delta);
68 void ResetAnimations(); 70 void ResetAnimations();
69 float RootScrollLayerTotalScrollY(); 71 float RootScrollLayerTotalScrollY();
(...skipping 22 matching lines...) Expand all
92 // The height of the visible top control such that it must be hidden when 94 // The height of the visible top control such that it must be hidden when
93 // the user stops the scroll. 95 // the user stops the scroll.
94 float top_controls_hide_height_; 96 float top_controls_hide_height_;
95 97
96 DISALLOW_COPY_AND_ASSIGN(TopControlsManager); 98 DISALLOW_COPY_AND_ASSIGN(TopControlsManager);
97 }; 99 };
98 100
99 } // namespace cc 101 } // namespace cc
100 102
101 #endif // CC_TOP_CONTROLS_MANAGER_H_ 103 #endif // CC_TOP_CONTROLS_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698