| 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 MediaValues_h | 5 #ifndef MediaValues_h |
| 6 #define MediaValues_h | 6 #define MediaValues_h |
| 7 | 7 |
| 8 #include "core/CoreExport.h" | 8 #include "core/CoreExport.h" |
| 9 #include "core/css/CSSPrimitiveValue.h" | 9 #include "core/css/CSSPrimitiveValue.h" |
| 10 #include "platform/heap/Handle.h" | 10 #include "platform/heap/Handle.h" |
| 11 #include "public/platform/PointerProperties.h" | 11 #include "public/platform/PointerProperties.h" |
| 12 #include "public/platform/ShapeProperties.h" | 12 #include "public/platform/ShapeProperties.h" |
| 13 #include "public/platform/WebDisplayMode.h" | 13 #include "public/platform/WebDisplayMode.h" |
| 14 | 14 |
| 15 namespace blink { | 15 namespace blink { |
| 16 | 16 |
| 17 class Document; | 17 class Document; |
| 18 class CSSPrimitiveValue; | 18 class CSSPrimitiveValue; |
| 19 class LocalFrame; | 19 class LocalFrame; |
| 20 enum class ColorSpaceGamut; |
| 20 | 21 |
| 21 class CORE_EXPORT MediaValues : public GarbageCollectedFinalized<MediaValues> { | 22 class CORE_EXPORT MediaValues : public GarbageCollectedFinalized<MediaValues> { |
| 22 public: | 23 public: |
| 23 virtual ~MediaValues() {} | 24 virtual ~MediaValues() {} |
| 24 DEFINE_INLINE_VIRTUAL_TRACE() {} | 25 DEFINE_INLINE_VIRTUAL_TRACE() {} |
| 25 | 26 |
| 26 static MediaValues* createDynamicIfFrameExists(LocalFrame*); | 27 static MediaValues* createDynamicIfFrameExists(LocalFrame*); |
| 27 virtual MediaValues* copy() const = 0; | 28 virtual MediaValues* copy() const = 0; |
| 28 | 29 |
| 29 static bool computeLengthImpl(double value, | 30 static bool computeLengthImpl(double value, |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 virtual int availableHoverTypes() const = 0; | 67 virtual int availableHoverTypes() const = 0; |
| 67 virtual bool threeDEnabled() const = 0; | 68 virtual bool threeDEnabled() const = 0; |
| 68 virtual const String mediaType() const = 0; | 69 virtual const String mediaType() const = 0; |
| 69 virtual WebDisplayMode displayMode() const = 0; | 70 virtual WebDisplayMode displayMode() const = 0; |
| 70 virtual bool strictMode() const = 0; | 71 virtual bool strictMode() const = 0; |
| 71 virtual Document* document() const = 0; | 72 virtual Document* document() const = 0; |
| 72 virtual bool hasValues() const = 0; | 73 virtual bool hasValues() const = 0; |
| 73 | 74 |
| 74 virtual void overrideViewportDimensions(double width, double height) = 0; | 75 virtual void overrideViewportDimensions(double width, double height) = 0; |
| 75 virtual DisplayShape displayShape() const = 0; | 76 virtual DisplayShape displayShape() const = 0; |
| 77 virtual ColorSpaceGamut colorGamut() const = 0; |
| 76 | 78 |
| 77 protected: | 79 protected: |
| 78 static double calculateViewportWidth(LocalFrame*); | 80 static double calculateViewportWidth(LocalFrame*); |
| 79 static double calculateViewportHeight(LocalFrame*); | 81 static double calculateViewportHeight(LocalFrame*); |
| 80 static int calculateDeviceWidth(LocalFrame*); | 82 static int calculateDeviceWidth(LocalFrame*); |
| 81 static int calculateDeviceHeight(LocalFrame*); | 83 static int calculateDeviceHeight(LocalFrame*); |
| 82 static bool calculateStrictMode(LocalFrame*); | 84 static bool calculateStrictMode(LocalFrame*); |
| 83 static float calculateDevicePixelRatio(LocalFrame*); | 85 static float calculateDevicePixelRatio(LocalFrame*); |
| 84 static int calculateColorBitsPerComponent(LocalFrame*); | 86 static int calculateColorBitsPerComponent(LocalFrame*); |
| 85 static int calculateMonochromeBitsPerComponent(LocalFrame*); | 87 static int calculateMonochromeBitsPerComponent(LocalFrame*); |
| 86 static int calculateDefaultFontSize(LocalFrame*); | 88 static int calculateDefaultFontSize(LocalFrame*); |
| 87 static const String calculateMediaType(LocalFrame*); | 89 static const String calculateMediaType(LocalFrame*); |
| 88 static WebDisplayMode calculateDisplayMode(LocalFrame*); | 90 static WebDisplayMode calculateDisplayMode(LocalFrame*); |
| 89 static bool calculateThreeDEnabled(LocalFrame*); | 91 static bool calculateThreeDEnabled(LocalFrame*); |
| 90 static PointerType calculatePrimaryPointerType(LocalFrame*); | 92 static PointerType calculatePrimaryPointerType(LocalFrame*); |
| 91 static int calculateAvailablePointerTypes(LocalFrame*); | 93 static int calculateAvailablePointerTypes(LocalFrame*); |
| 92 static HoverType calculatePrimaryHoverType(LocalFrame*); | 94 static HoverType calculatePrimaryHoverType(LocalFrame*); |
| 93 static int calculateAvailableHoverTypes(LocalFrame*); | 95 static int calculateAvailableHoverTypes(LocalFrame*); |
| 94 static DisplayShape calculateDisplayShape(LocalFrame*); | 96 static DisplayShape calculateDisplayShape(LocalFrame*); |
| 97 static ColorSpaceGamut calculateColorGamut(LocalFrame*); |
| 95 static LocalFrame* frameFrom(Document&); | 98 static LocalFrame* frameFrom(Document&); |
| 96 }; | 99 }; |
| 97 | 100 |
| 98 } // namespace blink | 101 } // namespace blink |
| 99 | 102 |
| 100 #endif // MediaValues_h | 103 #endif // MediaValues_h |
| OLD | NEW |