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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutSlider.h

Issue 2820343002: Media Controls: move timeline related code 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
3 * 3 *
4 * This library is free software; you can redistribute it and/or 4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public 5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either 6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version. 7 * version 2 of the License, or (at your option) any later version.
8 * 8 *
9 * This library is distributed in the hope that it will be useful, 9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Library General Public License for more details. 12 * Library General Public License for more details.
13 * 13 *
14 * You should have received a copy of the GNU Library General Public License 14 * You should have received a copy of the GNU Library General Public License
15 * along with this library; see the file COPYING.LIB. If not, write to 15 * along with this library; see the file COPYING.LIB. If not, write to
16 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 16 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA. 17 * Boston, MA 02110-1301, USA.
18 * 18 *
19 */ 19 */
20 20
21 #ifndef LayoutSlider_h 21 #ifndef LayoutSlider_h
22 #define LayoutSlider_h 22 #define LayoutSlider_h
23 23
24 #include "core/CoreExport.h"
24 #include "core/layout/LayoutFlexibleBox.h" 25 #include "core/layout/LayoutFlexibleBox.h"
25 26
26 namespace blink { 27 namespace blink {
27 28
28 class HTMLInputElement; 29 class HTMLInputElement;
29 class SliderThumbElement; 30 class SliderThumbElement;
30 31
31 class LayoutSlider final : public LayoutFlexibleBox { 32 class LayoutSlider final : public LayoutFlexibleBox {
32 public: 33 public:
33 static const int kDefaultTrackLength; 34 static const int kDefaultTrackLength;
34 35
35 explicit LayoutSlider(HTMLInputElement*); 36 explicit LayoutSlider(HTMLInputElement*);
36 ~LayoutSlider() override; 37 ~LayoutSlider() override;
37 38
38 bool InDragMode() const; 39 CORE_EXPORT bool InDragMode() const;
39 40
40 const char* GetName() const override { return "LayoutSlider"; } 41 const char* GetName() const override { return "LayoutSlider"; }
41 42
42 private: 43 private:
43 bool IsOfType(LayoutObjectType type) const override { 44 bool IsOfType(LayoutObjectType type) const override {
44 return type == kLayoutObjectSlider || LayoutFlexibleBox::IsOfType(type); 45 return type == kLayoutObjectSlider || LayoutFlexibleBox::IsOfType(type);
45 } 46 }
46 47
47 int BaselinePosition( 48 int BaselinePosition(
48 FontBaseline, 49 FontBaseline,
49 bool first_line, 50 bool first_line,
50 LineDirectionMode, 51 LineDirectionMode,
51 LinePositionMode = kPositionOnContainingLine) const override; 52 LinePositionMode = kPositionOnContainingLine) const override;
52 void ComputeIntrinsicLogicalWidths( 53 void ComputeIntrinsicLogicalWidths(
53 LayoutUnit& min_logical_width, 54 LayoutUnit& min_logical_width,
54 LayoutUnit& max_logical_width) const override; 55 LayoutUnit& max_logical_width) const override;
55 void UpdateLayout() override; 56 void UpdateLayout() override;
56 57
57 SliderThumbElement* GetSliderThumbElement() const; 58 SliderThumbElement* GetSliderThumbElement() const;
58 }; 59 };
59 60
60 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutSlider, IsSlider()); 61 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutSlider, IsSlider());
61 62
62 } // namespace blink 63 } // namespace blink
63 64
64 #endif // LayoutSlider_h 65 #endif // LayoutSlider_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698