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

Side by Side Diff: cc/layers/solid_color_scrollbar_layer.cc

Issue 2728253002: Remove indirection: setup scrollbar scroll layers in the scrollbar constructor (Closed)
Patch Set: Really fix reivewer comment Created 3 years, 9 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
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/layers/solid_color_scrollbar_layer.h" 5 #include "cc/layers/solid_color_scrollbar_layer.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "cc/layers/layer_impl.h" 9 #include "cc/layers/layer_impl.h"
10 #include "cc/layers/solid_color_scrollbar_layer_impl.h" 10 #include "cc/layers/solid_color_scrollbar_layer_impl.h"
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 } 92 }
93 93
94 bool SolidColorScrollbarLayer::AlwaysUseActiveTreeOpacity() const { 94 bool SolidColorScrollbarLayer::AlwaysUseActiveTreeOpacity() const {
95 return true; 95 return true;
96 } 96 }
97 97
98 int SolidColorScrollbarLayer::ScrollLayerId() const { 98 int SolidColorScrollbarLayer::ScrollLayerId() const {
99 return solid_color_scrollbar_layer_inputs_.scroll_layer_id; 99 return solid_color_scrollbar_layer_inputs_.scroll_layer_id;
100 } 100 }
101 101
102 void SolidColorScrollbarLayer::SetScrollLayer(int layer_id) {
103 if (layer_id == solid_color_scrollbar_layer_inputs_.scroll_layer_id)
104 return;
105
106 solid_color_scrollbar_layer_inputs_.scroll_layer_id = layer_id;
107 SetNeedsFullTreeSync();
108 }
109
110 ScrollbarOrientation SolidColorScrollbarLayer::orientation() const { 102 ScrollbarOrientation SolidColorScrollbarLayer::orientation() const {
111 return solid_color_scrollbar_layer_inputs_.orientation; 103 return solid_color_scrollbar_layer_inputs_.orientation;
112 } 104 }
113 105
114 } // namespace cc 106 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/solid_color_scrollbar_layer.h ('k') | third_party/WebKit/Source/core/frame/VisualViewport.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698