| 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 MediaValuesCached_h | 5 #ifndef MediaValuesCached_h |
| 6 #define MediaValuesCached_h | 6 #define MediaValuesCached_h |
| 7 | 7 |
| 8 #include "core/css/MediaValues.h" | 8 #include "core/css/MediaValues.h" |
| 9 | 9 |
| 10 namespace blink { | 10 namespace blink { |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 int colorBitsPerComponent; | 21 int colorBitsPerComponent; |
| 22 int monochromeBitsPerComponent; | 22 int monochromeBitsPerComponent; |
| 23 PointerType primaryPointerType; | 23 PointerType primaryPointerType; |
| 24 int availablePointerTypes; | 24 int availablePointerTypes; |
| 25 HoverType primaryHoverType; | 25 HoverType primaryHoverType; |
| 26 int availableHoverTypes; | 26 int availableHoverTypes; |
| 27 int defaultFontSize; | 27 int defaultFontSize; |
| 28 bool threeDEnabled; | 28 bool threeDEnabled; |
| 29 bool strictMode; | 29 bool strictMode; |
| 30 String mediaType; | 30 String mediaType; |
| 31 DisplayMode displayMode; | 31 WebDisplayMode displayMode; |
| 32 | 32 |
| 33 MediaValuesCachedData() | 33 MediaValuesCachedData() |
| 34 : viewportWidth(0) | 34 : viewportWidth(0) |
| 35 , viewportHeight(0) | 35 , viewportHeight(0) |
| 36 , deviceWidth(0) | 36 , deviceWidth(0) |
| 37 , deviceHeight(0) | 37 , deviceHeight(0) |
| 38 , devicePixelRatio(1.0) | 38 , devicePixelRatio(1.0) |
| 39 , colorBitsPerComponent(24) | 39 , colorBitsPerComponent(24) |
| 40 , monochromeBitsPerComponent(0) | 40 , monochromeBitsPerComponent(0) |
| 41 , primaryPointerType(PointerTypeNone) | 41 , primaryPointerType(PointerTypeNone) |
| 42 , availablePointerTypes(PointerTypeNone) | 42 , availablePointerTypes(PointerTypeNone) |
| 43 , primaryHoverType(HoverTypeNone) | 43 , primaryHoverType(HoverTypeNone) |
| 44 , availableHoverTypes(HoverTypeNone) | 44 , availableHoverTypes(HoverTypeNone) |
| 45 , defaultFontSize(16) | 45 , defaultFontSize(16) |
| 46 , threeDEnabled(false) | 46 , threeDEnabled(false) |
| 47 , strictMode(true) | 47 , strictMode(true) |
| 48 , displayMode(DisplayModeBrowser) | 48 , displayMode(WebDisplayModeBrowser) |
| 49 { | 49 { |
| 50 } | 50 } |
| 51 }; | 51 }; |
| 52 | 52 |
| 53 static PassRefPtr<MediaValues> create(); | 53 static PassRefPtr<MediaValues> create(); |
| 54 static PassRefPtr<MediaValues> create(Document&); | 54 static PassRefPtr<MediaValues> create(Document&); |
| 55 static PassRefPtr<MediaValues> create(LocalFrame*); | 55 static PassRefPtr<MediaValues> create(LocalFrame*); |
| 56 static PassRefPtr<MediaValues> create(MediaValuesCachedData&); | 56 static PassRefPtr<MediaValues> create(MediaValuesCachedData&); |
| 57 virtual PassRefPtr<MediaValues> copy() const override; | 57 virtual PassRefPtr<MediaValues> copy() const override; |
| 58 virtual bool isSafeToSendToAnotherThread() const override; | 58 virtual bool isSafeToSendToAnotherThread() const override; |
| 59 virtual bool computeLength(double value, CSSPrimitiveValue::UnitType, int& r
esult) const override; | 59 virtual bool computeLength(double value, CSSPrimitiveValue::UnitType, int& r
esult) const override; |
| 60 virtual bool computeLength(double value, CSSPrimitiveValue::UnitType, double
& result) const override; | 60 virtual bool computeLength(double value, CSSPrimitiveValue::UnitType, double
& result) const override; |
| 61 | 61 |
| 62 virtual int viewportWidth() const override; | 62 virtual int viewportWidth() const override; |
| 63 virtual int viewportHeight() const override; | 63 virtual int viewportHeight() const override; |
| 64 virtual int deviceWidth() const override; | 64 virtual int deviceWidth() const override; |
| 65 virtual int deviceHeight() const override; | 65 virtual int deviceHeight() const override; |
| 66 virtual float devicePixelRatio() const override; | 66 virtual float devicePixelRatio() const override; |
| 67 virtual int colorBitsPerComponent() const override; | 67 virtual int colorBitsPerComponent() const override; |
| 68 virtual int monochromeBitsPerComponent() const override; | 68 virtual int monochromeBitsPerComponent() const override; |
| 69 virtual PointerType primaryPointerType() const override; | 69 virtual PointerType primaryPointerType() const override; |
| 70 virtual int availablePointerTypes() const override; | 70 virtual int availablePointerTypes() const override; |
| 71 virtual HoverType primaryHoverType() const override; | 71 virtual HoverType primaryHoverType() const override; |
| 72 virtual int availableHoverTypes() const override; | 72 virtual int availableHoverTypes() const override; |
| 73 virtual bool threeDEnabled() const override; | 73 virtual bool threeDEnabled() const override; |
| 74 virtual bool strictMode() const override; | 74 virtual bool strictMode() const override; |
| 75 virtual Document* document() const override; | 75 virtual Document* document() const override; |
| 76 virtual bool hasValues() const override; | 76 virtual bool hasValues() const override; |
| 77 virtual const String mediaType() const override; | 77 virtual const String mediaType() const override; |
| 78 virtual DisplayMode displayMode() const override; | 78 virtual WebDisplayMode displayMode() const override; |
| 79 | 79 |
| 80 protected: | 80 protected: |
| 81 MediaValuesCached(); | 81 MediaValuesCached(); |
| 82 MediaValuesCached(LocalFrame*); | 82 MediaValuesCached(LocalFrame*); |
| 83 MediaValuesCached(const MediaValuesCachedData&); | 83 MediaValuesCached(const MediaValuesCachedData&); |
| 84 | 84 |
| 85 MediaValuesCachedData m_data; | 85 MediaValuesCachedData m_data; |
| 86 }; | 86 }; |
| 87 | 87 |
| 88 } // namespace | 88 } // namespace |
| 89 | 89 |
| 90 #endif // MediaValuesCached_h | 90 #endif // MediaValuesCached_h |
| OLD | NEW |