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/css/CSSPrimitiveValue.h" | 8 #include "core/css/CSSPrimitiveValue.h" |
9 #include "core/css/DisplayModeProperties.h" | |
10 #include "core/css/PointerProperties.h" | 9 #include "core/css/PointerProperties.h" |
| 10 #include "public/platform/WebDisplayMode.h" |
11 #include "wtf/RefCounted.h" | 11 #include "wtf/RefCounted.h" |
12 #include "wtf/RefPtr.h" | 12 #include "wtf/RefPtr.h" |
13 | 13 |
14 namespace blink { | 14 namespace blink { |
15 | 15 |
16 class Document; | 16 class Document; |
17 class CSSPrimitiveValue; | 17 class CSSPrimitiveValue; |
18 class LocalFrame; | 18 class LocalFrame; |
19 | 19 |
20 class MediaValues : public RefCounted<MediaValues> { | 20 class MediaValues : public RefCounted<MediaValues> { |
(...skipping 29 matching lines...) Expand all Loading... |
50 virtual int deviceHeight() const = 0; | 50 virtual int deviceHeight() const = 0; |
51 virtual float devicePixelRatio() const = 0; | 51 virtual float devicePixelRatio() const = 0; |
52 virtual int colorBitsPerComponent() const = 0; | 52 virtual int colorBitsPerComponent() const = 0; |
53 virtual int monochromeBitsPerComponent() const = 0; | 53 virtual int monochromeBitsPerComponent() const = 0; |
54 virtual PointerType primaryPointerType() const = 0; | 54 virtual PointerType primaryPointerType() const = 0; |
55 virtual int availablePointerTypes() const = 0; | 55 virtual int availablePointerTypes() const = 0; |
56 virtual HoverType primaryHoverType() const = 0; | 56 virtual HoverType primaryHoverType() const = 0; |
57 virtual int availableHoverTypes() const = 0; | 57 virtual int availableHoverTypes() const = 0; |
58 virtual bool threeDEnabled() const = 0; | 58 virtual bool threeDEnabled() const = 0; |
59 virtual const String mediaType() const = 0; | 59 virtual const String mediaType() const = 0; |
60 virtual DisplayMode displayMode() const = 0; | 60 virtual WebDisplayMode displayMode() const = 0; |
61 virtual bool strictMode() const = 0; | 61 virtual bool strictMode() const = 0; |
62 virtual Document* document() const = 0; | 62 virtual Document* document() const = 0; |
63 virtual bool hasValues() const = 0; | 63 virtual bool hasValues() const = 0; |
64 | 64 |
65 protected: | 65 protected: |
66 int calculateViewportWidth(LocalFrame*) const; | 66 int calculateViewportWidth(LocalFrame*) const; |
67 int calculateViewportHeight(LocalFrame*) const; | 67 int calculateViewportHeight(LocalFrame*) const; |
68 int calculateDeviceWidth(LocalFrame*) const; | 68 int calculateDeviceWidth(LocalFrame*) const; |
69 int calculateDeviceHeight(LocalFrame*) const; | 69 int calculateDeviceHeight(LocalFrame*) const; |
70 bool calculateStrictMode(LocalFrame*) const; | 70 bool calculateStrictMode(LocalFrame*) const; |
71 float calculateDevicePixelRatio(LocalFrame*) const; | 71 float calculateDevicePixelRatio(LocalFrame*) const; |
72 int calculateColorBitsPerComponent(LocalFrame*) const; | 72 int calculateColorBitsPerComponent(LocalFrame*) const; |
73 int calculateMonochromeBitsPerComponent(LocalFrame*) const; | 73 int calculateMonochromeBitsPerComponent(LocalFrame*) const; |
74 int calculateDefaultFontSize(LocalFrame*) const; | 74 int calculateDefaultFontSize(LocalFrame*) const; |
75 const String calculateMediaType(LocalFrame*) const; | 75 const String calculateMediaType(LocalFrame*) const; |
76 DisplayMode calculateDisplayMode(LocalFrame*) const; | 76 WebDisplayMode calculateDisplayMode(LocalFrame*) const; |
77 bool calculateThreeDEnabled(LocalFrame*) const; | 77 bool calculateThreeDEnabled(LocalFrame*) const; |
78 PointerType calculatePrimaryPointerType(LocalFrame*) const; | 78 PointerType calculatePrimaryPointerType(LocalFrame*) const; |
79 int calculateAvailablePointerTypes(LocalFrame*) const; | 79 int calculateAvailablePointerTypes(LocalFrame*) const; |
80 HoverType calculatePrimaryHoverType(LocalFrame*) const; | 80 HoverType calculatePrimaryHoverType(LocalFrame*) const; |
81 int calculateAvailableHoverTypes(LocalFrame*) const; | 81 int calculateAvailableHoverTypes(LocalFrame*) const; |
82 static LocalFrame* frameFrom(Document&); | 82 static LocalFrame* frameFrom(Document&); |
83 | 83 |
84 }; | 84 }; |
85 | 85 |
86 } // namespace | 86 } // namespace |
87 | 87 |
88 #endif // MediaValues_h | 88 #endif // MediaValues_h |
OLD | NEW |