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

Unified Diff: third_party/WebKit/Source/core/layout/api/LayoutSliderItem.cpp

Issue 2830653002: Media Controls: move volume slider to modules/. (Closed)
Patch Set: _ Created 3 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/layout/api/LayoutSliderItem.cpp
diff --git a/third_party/WebKit/Source/core/layout/api/LayoutSliderItem.cpp b/third_party/WebKit/Source/core/layout/api/LayoutSliderItem.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..413de553fb09b54d31e27dfe05a734185e3afb74
--- /dev/null
+++ b/third_party/WebKit/Source/core/layout/api/LayoutSliderItem.cpp
@@ -0,0 +1,35 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "core/layout/api/LayoutSliderItem.h"
+
+#include "core/layout/LayoutSlider.h"
+
+namespace blink {
+
+LayoutSliderItem::LayoutSliderItem(LayoutSlider* layout_slider)
+ : LayoutBlockItem(layout_slider) {}
+
+LayoutSliderItem::LayoutSliderItem(const LayoutBlockItem& item)
+ : LayoutBlockItem(item) {
+ SECURITY_DCHECK(!item || item.IsSlider());
+}
+
+LayoutSliderItem::LayoutSliderItem(std::nullptr_t) : LayoutBlockItem(nullptr) {}
+
+LayoutSliderItem::LayoutSliderItem() = default;
+
+bool LayoutSliderItem::InDragMode() const {
+ return ToSlider()->InDragMode();
+}
+
+LayoutSlider* LayoutSliderItem::ToSlider() {
+ return ToLayoutSlider(GetLayoutObject());
+}
+
+const LayoutSlider* LayoutSliderItem::ToSlider() const {
+ return ToLayoutSlider(GetLayoutObject());
+}
+
+} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698