| 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 "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "cc/layers/painted_scrollbar_layer.h" | 9 #include "cc/layers/painted_scrollbar_layer.h" |
| 10 #include "cc/test/fake_scrollbar.h" | 10 #include "cc/test/fake_scrollbar.h" |
| 11 | 11 |
| 12 namespace base { template<typename T> class AutoReset; } | 12 namespace base { template<typename T> class AutoReset; } |
| 13 | 13 |
| 14 namespace cc { | 14 namespace cc { |
| 15 | 15 |
| 16 class FakePaintedScrollbarLayer : public PaintedScrollbarLayer { | 16 class FakePaintedScrollbarLayer : public PaintedScrollbarLayer { |
| 17 public: | 17 public: |
| 18 static scoped_refptr<FakePaintedScrollbarLayer> | 18 static scoped_refptr<FakePaintedScrollbarLayer> |
| 19 Create(bool paint_during_update, bool has_thumb, int scrolling_layer_id); | 19 Create(bool paint_during_update, |
| 20 bool has_thumb, |
| 21 int scrolling_layer_id); |
| 22 static scoped_refptr<FakePaintedScrollbarLayer> |
| 23 Create(bool paint_during_update, |
| 24 bool has_thumb, |
| 25 int scrolling_layer_id, |
| 26 FakeScrollbar* fake_scrollbar); |
| 27 |
| 20 int update_count() const { return update_count_; } | 28 int update_count() const { return update_count_; } |
| 21 void reset_update_count() { update_count_ = 0; } | 29 void reset_update_count() { update_count_ = 0; } |
| 22 | 30 |
| 23 virtual bool Update(ResourceUpdateQueue* queue, | 31 virtual bool Update(ResourceUpdateQueue* queue, |
| 24 const OcclusionTracker* occlusion) OVERRIDE; | 32 const OcclusionTracker* occlusion) OVERRIDE; |
| 25 | 33 |
| 26 virtual void PushPropertiesTo(LayerImpl* layer) OVERRIDE; | 34 virtual void PushPropertiesTo(LayerImpl* layer) OVERRIDE; |
| 27 | 35 |
| 28 scoped_ptr<base::AutoReset<bool> > IgnoreSetNeedsCommit(); | 36 scoped_ptr<base::AutoReset<bool> > IgnoreSetNeedsCommit(); |
| 29 | 37 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 48 virtual ~FakePaintedScrollbarLayer(); | 56 virtual ~FakePaintedScrollbarLayer(); |
| 49 | 57 |
| 50 int update_count_; | 58 int update_count_; |
| 51 size_t push_properties_count_; | 59 size_t push_properties_count_; |
| 52 FakeScrollbar* fake_scrollbar_; | 60 FakeScrollbar* fake_scrollbar_; |
| 53 }; | 61 }; |
| 54 | 62 |
| 55 } // namespace cc | 63 } // namespace cc |
| 56 | 64 |
| 57 #endif // CC_TEST_FAKE_PAINTED_SCROLLBAR_LAYER_H_ | 65 #endif // CC_TEST_FAKE_PAINTED_SCROLLBAR_LAYER_H_ |
| OLD | NEW |