| 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 #ifndef CC_TEST_FAKE_PAINTED_SCROLLBAR_LAYER_H_ | 5 #ifndef CC_TEST_FAKE_PAINTED_SCROLLBAR_LAYER_H_ |
| 6 #define CC_TEST_FAKE_PAINTED_SCROLLBAR_LAYER_H_ | 6 #define CC_TEST_FAKE_PAINTED_SCROLLBAR_LAYER_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| 11 | 11 |
| 12 #include "cc/layers/painted_scrollbar_layer.h" | 12 #include "cc/layers/painted_scrollbar_layer.h" |
| 13 #include "cc/test/fake_scrollbar.h" | 13 #include "cc/test/fake_scrollbar.h" |
| 14 | 14 |
| 15 namespace base { template<typename T> class AutoReset; } | 15 namespace base { template<typename T> class AutoReset; } |
| 16 | 16 |
| 17 namespace cc { | 17 namespace cc { |
| 18 | 18 |
| 19 class FakePaintedScrollbarLayer : public PaintedScrollbarLayer { | 19 class FakePaintedScrollbarLayer : public PaintedScrollbarLayer { |
| 20 public: | 20 public: |
| 21 static scoped_refptr<FakePaintedScrollbarLayer> Create( | 21 static scoped_refptr<FakePaintedScrollbarLayer> Create( |
| 22 bool paint_during_update, | 22 bool paint_during_update, |
| 23 bool has_thumb, | 23 bool has_thumb, |
| 24 int scrolling_layer_id); | 24 int scrolling_layer_id); |
| 25 static scoped_refptr<FakePaintedScrollbarLayer> Create( |
| 26 bool paint_during_update, |
| 27 bool has_thumb, |
| 28 ScrollbarOrientation orientation, |
| 29 bool is_left_side_vertical_scrollbar, |
| 30 bool is_overlay, |
| 31 int scrolling_layer_id); |
| 25 int update_count() const { return update_count_; } | 32 int update_count() const { return update_count_; } |
| 26 void reset_update_count() { update_count_ = 0; } | 33 void reset_update_count() { update_count_ = 0; } |
| 27 | 34 |
| 28 bool Update() override; | 35 bool Update() override; |
| 29 | 36 |
| 30 void PushPropertiesTo(LayerImpl* layer) override; | 37 void PushPropertiesTo(LayerImpl* layer) override; |
| 31 | 38 |
| 32 std::unique_ptr<base::AutoReset<bool>> IgnoreSetNeedsCommit(); | 39 std::unique_ptr<base::AutoReset<bool>> IgnoreSetNeedsCommit(); |
| 33 | 40 |
| 34 size_t push_properties_count() const { return push_properties_count_; } | 41 size_t push_properties_count() const { return push_properties_count_; } |
| (...skipping 18 matching lines...) Expand all Loading... |
| 53 ~FakePaintedScrollbarLayer() override; | 60 ~FakePaintedScrollbarLayer() override; |
| 54 | 61 |
| 55 int update_count_; | 62 int update_count_; |
| 56 size_t push_properties_count_; | 63 size_t push_properties_count_; |
| 57 FakeScrollbar* fake_scrollbar_; | 64 FakeScrollbar* fake_scrollbar_; |
| 58 }; | 65 }; |
| 59 | 66 |
| 60 } // namespace cc | 67 } // namespace cc |
| 61 | 68 |
| 62 #endif // CC_TEST_FAKE_PAINTED_SCROLLBAR_LAYER_H_ | 69 #endif // CC_TEST_FAKE_PAINTED_SCROLLBAR_LAYER_H_ |
| OLD | NEW |