| OLD | NEW |
| 1 | |
| 2 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 3 // 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 |
| 4 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 5 | 4 |
| 6 #ifndef LayoutSliderItem_h | 5 #ifndef LayoutSliderItem_h |
| 7 #define LayoutSliderItem_h | 6 #define LayoutSliderItem_h |
| 8 | 7 |
| 8 #include "core/CoreExport.h" |
| 9 #include "core/layout/LayoutSlider.h" | 9 #include "core/layout/LayoutSlider.h" |
| 10 #include "core/layout/api/LayoutBlockItem.h" | 10 #include "core/layout/api/LayoutBlockItem.h" |
| 11 | 11 |
| 12 namespace blink { | 12 namespace blink { |
| 13 | 13 |
| 14 class LayoutSliderItem : public LayoutBlockItem { | 14 class LayoutSliderItem : public LayoutBlockItem { |
| 15 public: | 15 public: |
| 16 explicit LayoutSliderItem(LayoutSlider* layout_slider) | 16 explicit LayoutSliderItem(LayoutSlider* layout_slider) |
| 17 : LayoutBlockItem(layout_slider) {} | 17 : LayoutBlockItem(layout_slider) {} |
| 18 | 18 |
| 19 explicit LayoutSliderItem(const LayoutBlockItem& item) | 19 explicit LayoutSliderItem(const LayoutBlockItem& item) |
| 20 : LayoutBlockItem(item) { | 20 : LayoutBlockItem(item) { |
| 21 SECURITY_DCHECK(!item || item.IsSlider()); | 21 SECURITY_DCHECK(!item || item.IsSlider()); |
| 22 } | 22 } |
| 23 | 23 |
| 24 explicit LayoutSliderItem(std::nullptr_t) : LayoutBlockItem(nullptr) {} | 24 explicit LayoutSliderItem(std::nullptr_t) : LayoutBlockItem(nullptr) {} |
| 25 | 25 |
| 26 LayoutSliderItem() {} | 26 LayoutSliderItem() = default; |
| 27 | 27 |
| 28 bool InDragMode() const { return ToSlider()->InDragMode(); } | 28 CORE_EXPORT bool InDragMode() const { return ToSlider()->InDragMode(); } |
| 29 | 29 |
| 30 private: | 30 private: |
| 31 LayoutSlider* ToSlider() { return ToLayoutSlider(GetLayoutObject()); } | 31 LayoutSlider* ToSlider() { return ToLayoutSlider(GetLayoutObject()); } |
| 32 const LayoutSlider* ToSlider() const { | 32 const LayoutSlider* ToSlider() const { |
| 33 return ToLayoutSlider(GetLayoutObject()); | 33 return ToLayoutSlider(GetLayoutObject()); |
| 34 } | 34 } |
| 35 }; | 35 }; |
| 36 | 36 |
| 37 } // namespace blink | 37 } // namespace blink |
| 38 | 38 |
| 39 #endif // LayoutSliderItem_h | 39 #endif // LayoutSliderItem_h |
| OLD | NEW |