Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2011 The Chromium Authors. All rights reserved. | |
|
danakj
2013/02/05 17:55:02
2013
| |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CC_HARDCODED_SCROLLBAR_H_ | |
| 6 #define CC_HARDCODED_SCROLLBAR_H_ | |
| 7 | |
| 8 #include "base/memory/scoped_ptr.h" | |
| 9 #include "base/time.h" | |
| 10 #include "build/build_config.h" | |
| 11 #include "ui/gfx/vector2d.h" | |
| 12 | |
| 13 namespace cc { | |
| 14 | |
| 15 class LayerTreeHostImpl; | |
| 16 class RenderPass; | |
| 17 class SharedQuadState; | |
| 18 | |
| 19 #if defined(OS_ANDROID) | |
| 20 // FIXME(trchen): This class a quick hack scrollbar for Android for M25. | |
| 21 // Need to disable WebKit-side scrollbar for now because sublayer | |
| 22 // scrollbars aren't coordinated in the compositor, and the update latency is | |
| 23 // too long when impl-side painting is enabled. We should remove this hack | |
| 24 // after implementing the coordinator for sublayer scrollbars. | |
| 25 class HardcodedScrollbar { | |
| 26 public: | |
| 27 HardcodedScrollbar(LayerTreeHostImpl* layer_tree_host_impl); | |
|
danakj
2013/02/05 17:55:02
1 space before this
| |
| 28 void Animate(base::TimeTicks monotonic_time); | |
| 29 void PrependQuads(RenderPass* render_pass); | |
| 30 void DidPinchGestureUpdate(base::TimeTicks monotonic_time); | |
| 31 void DidPinchGestureEnd(base::TimeTicks monotonic_time); | |
| 32 void DidUpdateScrollOffset(base::TimeTicks monotonic_time); | |
| 33 private: | |
| 34 LayerTreeHostImpl* layer_tree_host_impl_; | |
|
danakj
2013/02/05 17:55:02
1 space
| |
| 35 | |
| 36 float opacity_; | |
| 37 bool pinch_in_effect_; | |
| 38 gfx::Vector2dF last_scroll_offset_; | |
| 39 base::TimeTicks last_awaken_time_; | |
| 40 }; | |
| 41 #else | |
| 42 // This is a dummy class for platforms that don't need a hardcoded scrollbar. | |
| 43 // Everything is inlined for zero overhead. | |
| 44 class HardcodedScrollbar { | |
| 45 public: | |
|
danakj
2013/02/05 17:55:02
1 space
| |
| 46 inline HardcodedScrollbar(LayerTreeHostImpl*) { } | |
|
danakj
2013/02/05 17:55:02
no space between {}s
| |
| 47 inline void Animate(base::TimeTicks) { } | |
|
danakj
2013/02/05 17:55:02
variables should still get names i believe
| |
| 48 inline void PrependQuads(RenderPass*) { } | |
| 49 inline void DidPinchGestureUpdate(base::TimeTicks) { } | |
| 50 inline void DidPinchGestureEnd(base::TimeTicks) { } | |
| 51 inline void DidUpdateScrollOffset(base::TimeTicks) { } | |
| 52 }; | |
| 53 #endif | |
| 54 | |
| 55 } // namespace cc | |
| 56 | |
| 57 #endif // CC_HARDCODED_SCROLLBAR_H_ | |
| OLD | NEW |