Chromium Code Reviews| 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 #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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 93 | 93 |
| 94 bool SolidColorScrollbarLayer::AlwaysUseActiveTreeOpacity() const { | 94 bool SolidColorScrollbarLayer::AlwaysUseActiveTreeOpacity() const { |
| 95 return true; | 95 return true; |
| 96 } | 96 } |
| 97 | 97 |
| 98 ElementId SolidColorScrollbarLayer::scroll_element_id() const { | 98 ElementId SolidColorScrollbarLayer::scroll_element_id() const { |
| 99 return solid_color_scrollbar_layer_inputs_.scroll_element_id; | 99 return solid_color_scrollbar_layer_inputs_.scroll_element_id; |
| 100 } | 100 } |
| 101 | 101 |
| 102 void SolidColorScrollbarLayer::SetScrollElementId(ElementId element_id) { | 102 void SolidColorScrollbarLayer::SetScrollElementId(ElementId element_id) { |
| 103 if (element_id == solid_color_scrollbar_layer_inputs_.scroll_element_id) | 103 if (element_id.id == solid_color_scrollbar_layer_inputs_.scroll_element_id.id) |
|
wkorman
2017/05/08 18:23:24
Can't we rely on operator== here?
| |
| 104 return; | 104 return; |
| 105 | 105 |
| 106 solid_color_scrollbar_layer_inputs_.scroll_element_id = element_id; | 106 solid_color_scrollbar_layer_inputs_.scroll_element_id = element_id; |
| 107 SetNeedsFullTreeSync(); | 107 SetNeedsFullTreeSync(); |
| 108 } | 108 } |
| 109 | 109 |
| 110 ScrollbarOrientation SolidColorScrollbarLayer::orientation() const { | 110 ScrollbarOrientation SolidColorScrollbarLayer::orientation() const { |
| 111 return solid_color_scrollbar_layer_inputs_.orientation; | 111 return solid_color_scrollbar_layer_inputs_.orientation; |
| 112 } | 112 } |
| 113 | 113 |
| 114 } // namespace cc | 114 } // namespace cc |
| OLD | NEW |