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

Side by Side Diff: cc/test/fake_painted_scrollbar_layer.h

Issue 1866203004: Convert //cc from scoped_ptr to std::unique_ptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: scopedptrcc: rebase Created 4 years, 8 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
« no previous file with comments | « cc/test/fake_output_surface.cc ('k') | cc/test/fake_painted_scrollbar_layer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_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 "base/memory/scoped_ptr.h" 10 #include <memory>
11
11 #include "cc/layers/painted_scrollbar_layer.h" 12 #include "cc/layers/painted_scrollbar_layer.h"
12 #include "cc/test/fake_scrollbar.h" 13 #include "cc/test/fake_scrollbar.h"
13 14
14 namespace base { template<typename T> class AutoReset; } 15 namespace base { template<typename T> class AutoReset; }
15 16
16 namespace cc { 17 namespace cc {
17 18
18 class FakePaintedScrollbarLayer : public PaintedScrollbarLayer { 19 class FakePaintedScrollbarLayer : public PaintedScrollbarLayer {
19 public: 20 public:
20 static scoped_refptr<FakePaintedScrollbarLayer> Create( 21 static scoped_refptr<FakePaintedScrollbarLayer> Create(
21 bool paint_during_update, 22 bool paint_during_update,
22 bool has_thumb, 23 bool has_thumb,
23 int scrolling_layer_id); 24 int scrolling_layer_id);
24 int update_count() const { return update_count_; } 25 int update_count() const { return update_count_; }
25 void reset_update_count() { update_count_ = 0; } 26 void reset_update_count() { update_count_ = 0; }
26 27
27 bool Update() override; 28 bool Update() override;
28 29
29 void PushPropertiesTo(LayerImpl* layer) override; 30 void PushPropertiesTo(LayerImpl* layer) override;
30 31
31 scoped_ptr<base::AutoReset<bool>> IgnoreSetNeedsCommit(); 32 std::unique_ptr<base::AutoReset<bool>> IgnoreSetNeedsCommit();
32 33
33 size_t push_properties_count() const { return push_properties_count_; } 34 size_t push_properties_count() const { return push_properties_count_; }
34 void reset_push_properties_count() { push_properties_count_ = 0; } 35 void reset_push_properties_count() { push_properties_count_ = 0; }
35 36
36 // For unit tests 37 // For unit tests
37 UIResourceId track_resource_id() { 38 UIResourceId track_resource_id() {
38 return PaintedScrollbarLayer::track_resource_id(); 39 return PaintedScrollbarLayer::track_resource_id();
39 } 40 }
40 UIResourceId thumb_resource_id() { 41 UIResourceId thumb_resource_id() {
41 return PaintedScrollbarLayer::thumb_resource_id(); 42 return PaintedScrollbarLayer::thumb_resource_id();
(...skipping 10 matching lines...) Expand all
52 ~FakePaintedScrollbarLayer() override; 53 ~FakePaintedScrollbarLayer() override;
53 54
54 int update_count_; 55 int update_count_;
55 size_t push_properties_count_; 56 size_t push_properties_count_;
56 FakeScrollbar* fake_scrollbar_; 57 FakeScrollbar* fake_scrollbar_;
57 }; 58 };
58 59
59 } // namespace cc 60 } // namespace cc
60 61
61 #endif // CC_TEST_FAKE_PAINTED_SCROLLBAR_LAYER_H_ 62 #endif // CC_TEST_FAKE_PAINTED_SCROLLBAR_LAYER_H_
OLDNEW
« no previous file with comments | « cc/test/fake_output_surface.cc ('k') | cc/test/fake_painted_scrollbar_layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698