| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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_SCROLLBAR_LAYER_H_ | 5 #ifndef CC_TEST_FAKE_SCROLLBAR_LAYER_H_ |
| 6 #define CC_TEST_FAKE_SCROLLBAR_LAYER_H_ | 6 #define CC_TEST_FAKE_SCROLLBAR_LAYER_H_ |
| 7 | 7 |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "cc/scrollbar_layer.h" | 9 #include "cc/scrollbar_layer.h" |
| 10 | 10 |
| 11 namespace cc { | 11 namespace cc { |
| 12 | 12 |
| 13 class FakeScrollbarLayer : public ScrollbarLayer { | 13 class FakeScrollbarLayer : public ScrollbarLayer { |
| 14 public: | 14 public: |
| 15 static scoped_refptr<FakeScrollbarLayer> Create( | 15 static scoped_refptr<FakeScrollbarLayer> Create( |
| 16 bool paint_during_update, int scrolling_layer_id) { | 16 bool paint_during_update, bool has_thumb, int scrolling_layer_id) { |
| 17 return make_scoped_refptr(new FakeScrollbarLayer( | 17 return make_scoped_refptr(new FakeScrollbarLayer( |
| 18 paint_during_update, scrolling_layer_id)); | 18 paint_during_update, has_thumb, scrolling_layer_id)); |
| 19 } | 19 } |
| 20 | 20 |
| 21 int update_count() { return update_count_; } | 21 int update_count() { return update_count_; } |
| 22 void reset_update_count() { update_count_ = 0; } | 22 void reset_update_count() { update_count_ = 0; } |
| 23 | 23 |
| 24 virtual void update( | 24 virtual void update( |
| 25 ResourceUpdateQueue& queue, | 25 ResourceUpdateQueue& queue, |
| 26 const OcclusionTracker* occlusion, | 26 const OcclusionTracker* occlusion, |
| 27 RenderingStats& stats) OVERRIDE; | 27 RenderingStats& stats) OVERRIDE; |
| 28 | 28 |
| 29 private: | 29 private: |
| 30 FakeScrollbarLayer(bool paint_during_update, int scrolling_layer_id); | 30 FakeScrollbarLayer( |
| 31 bool paint_during_update, bool has_thumb, int scrolling_layer_id); |
| 31 virtual ~FakeScrollbarLayer(); | 32 virtual ~FakeScrollbarLayer(); |
| 32 | 33 |
| 33 int update_count_; | 34 int update_count_; |
| 34 }; | 35 }; |
| 35 | 36 |
| 36 } // namespace cc | 37 } // namespace cc |
| 37 | 38 |
| 38 #endif // CC_TEST_FAKE_SCROLLBAR_LAYER_H_ | 39 #endif // CC_TEST_FAKE_SCROLLBAR_LAYER_H_ |
| OLD | NEW |