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

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

Issue 2468423004: Left side vertical MD scrollbars grow toward right. (Closed)
Patch Set: Created 4 years, 1 month 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_painted_scrollbar_layer.h ('k') | cc/test/fake_scrollbar.h » ('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 #include "cc/test/fake_painted_scrollbar_layer.h" 5 #include "cc/test/fake_painted_scrollbar_layer.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/memory/ptr_util.h" 8 #include "base/memory/ptr_util.h"
9 #include "cc/test/fake_scrollbar.h" 9 #include "cc/test/fake_scrollbar.h"
10 10
11 namespace cc { 11 namespace cc {
12 12
13 scoped_refptr<FakePaintedScrollbarLayer> FakePaintedScrollbarLayer::Create( 13 scoped_refptr<FakePaintedScrollbarLayer> FakePaintedScrollbarLayer::Create(
14 bool paint_during_update, 14 bool paint_during_update,
15 bool has_thumb, 15 bool has_thumb,
16 int scrolling_layer_id) { 16 int scrolling_layer_id) {
17 FakeScrollbar* fake_scrollbar = new FakeScrollbar( 17 return Create(paint_during_update, has_thumb, HORIZONTAL, false, false,
18 paint_during_update, has_thumb, false); 18 scrolling_layer_id);
19 }
20
21 scoped_refptr<FakePaintedScrollbarLayer> FakePaintedScrollbarLayer::Create(
22 bool paint_during_update,
23 bool has_thumb,
24 ScrollbarOrientation orientation,
25 bool is_left_side_vertical_scrollbar,
26 bool is_overlay,
27 int scrolling_layer_id) {
28 FakeScrollbar* fake_scrollbar =
29 new FakeScrollbar(paint_during_update, has_thumb, orientation,
30 is_left_side_vertical_scrollbar, is_overlay);
19 return make_scoped_refptr( 31 return make_scoped_refptr(
20 new FakePaintedScrollbarLayer(fake_scrollbar, scrolling_layer_id)); 32 new FakePaintedScrollbarLayer(fake_scrollbar, scrolling_layer_id));
21 } 33 }
22 34
23 FakePaintedScrollbarLayer::FakePaintedScrollbarLayer( 35 FakePaintedScrollbarLayer::FakePaintedScrollbarLayer(
24 FakeScrollbar* fake_scrollbar, 36 FakeScrollbar* fake_scrollbar,
25 int scrolling_layer_id) 37 int scrolling_layer_id)
26 : PaintedScrollbarLayer(std::unique_ptr<Scrollbar>(fake_scrollbar), 38 : PaintedScrollbarLayer(std::unique_ptr<Scrollbar>(fake_scrollbar),
27 scrolling_layer_id), 39 scrolling_layer_id),
28 update_count_(0), 40 update_count_(0),
(...skipping 16 matching lines...) Expand all
45 ++push_properties_count_; 57 ++push_properties_count_;
46 } 58 }
47 59
48 std::unique_ptr<base::AutoReset<bool>> 60 std::unique_ptr<base::AutoReset<bool>>
49 FakePaintedScrollbarLayer::IgnoreSetNeedsCommit() { 61 FakePaintedScrollbarLayer::IgnoreSetNeedsCommit() {
50 return base::MakeUnique<base::AutoReset<bool>>(&ignore_set_needs_commit_, 62 return base::MakeUnique<base::AutoReset<bool>>(&ignore_set_needs_commit_,
51 true); 63 true);
52 } 64 }
53 65
54 } // namespace cc 66 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/fake_painted_scrollbar_layer.h ('k') | cc/test/fake_scrollbar.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698