| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #ifndef MediaValuesDynamic_h | 5 #ifndef MediaValuesDynamic_h |
| 6 #define MediaValuesDynamic_h | 6 #define MediaValuesDynamic_h |
| 7 | 7 |
| 8 #include "core/css/MediaValues.h" | 8 #include "core/css/MediaValues.h" |
| 9 | 9 |
| 10 namespace blink { | 10 namespace blink { |
| 11 | 11 |
| 12 class Document; | 12 class Document; |
| 13 | 13 |
| 14 class MediaValuesDynamic final : public MediaValues { | 14 class MediaValuesDynamic final : public MediaValues { |
| 15 public: | 15 public: |
| 16 static RawPtr<MediaValues> create(Document&); | 16 static MediaValues* create(Document&); |
| 17 static RawPtr<MediaValues> create(LocalFrame*); | 17 static MediaValues* create(LocalFrame*); |
| 18 RawPtr<MediaValues> copy() const override; | 18 MediaValues* copy() const override; |
| 19 bool computeLength(double value, CSSPrimitiveValue::UnitType, int& result) c
onst override; | 19 bool computeLength(double value, CSSPrimitiveValue::UnitType, int& result) c
onst override; |
| 20 bool computeLength(double value, CSSPrimitiveValue::UnitType, double& result
) const override; | 20 bool computeLength(double value, CSSPrimitiveValue::UnitType, double& result
) const override; |
| 21 | 21 |
| 22 double viewportWidth() const override; | 22 double viewportWidth() const override; |
| 23 double viewportHeight() const override; | 23 double viewportHeight() const override; |
| 24 int deviceWidth() const override; | 24 int deviceWidth() const override; |
| 25 int deviceHeight() const override; | 25 int deviceHeight() const override; |
| 26 float devicePixelRatio() const override; | 26 float devicePixelRatio() const override; |
| 27 int colorBitsPerComponent() const override; | 27 int colorBitsPerComponent() const override; |
| 28 int monochromeBitsPerComponent() const override; | 28 int monochromeBitsPerComponent() const override; |
| (...skipping 19 matching lines...) Expand all Loading... |
| 48 // MediaQueryEvaluator is reset on |Document::detach|. | 48 // MediaQueryEvaluator is reset on |Document::detach|. |
| 49 Member<LocalFrame> m_frame; | 49 Member<LocalFrame> m_frame; |
| 50 bool m_viewportDimensionsOverridden; | 50 bool m_viewportDimensionsOverridden; |
| 51 double m_viewportWidthOverride; | 51 double m_viewportWidthOverride; |
| 52 double m_viewportHeightOverride; | 52 double m_viewportHeightOverride; |
| 53 }; | 53 }; |
| 54 | 54 |
| 55 } // namespace blink | 55 } // namespace blink |
| 56 | 56 |
| 57 #endif // MediaValuesDynamic_h | 57 #endif // MediaValuesDynamic_h |
| OLD | NEW |