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/CoreExport.h" | 8 #include "core/CoreExport.h" |
9 #include "core/css/MediaValues.h" | 9 #include "core/css/MediaValues.h" |
10 | 10 |
11 namespace blink { | 11 namespace blink { |
12 | 12 |
13 class CORE_EXPORT MediaValuesCached final : public MediaValues { | 13 class CORE_EXPORT MediaValuesCached final : public MediaValues { |
14 public: | 14 public: |
15 struct MediaValuesCachedData final { | 15 struct MediaValuesCachedData final { |
16 DISALLOW_NEW(); | 16 DISALLOW_NEW(); |
17 // Members variables must be thread safe, since they're copied to the parser
thread | 17 // Members variables must be thread safe, since they're copied to the parser |
| 18 // thread |
18 double viewportWidth; | 19 double viewportWidth; |
19 double viewportHeight; | 20 double viewportHeight; |
20 int deviceWidth; | 21 int deviceWidth; |
21 int deviceHeight; | 22 int deviceHeight; |
22 float devicePixelRatio; | 23 float devicePixelRatio; |
23 int colorBitsPerComponent; | 24 int colorBitsPerComponent; |
24 int monochromeBitsPerComponent; | 25 int monochromeBitsPerComponent; |
25 PointerType primaryPointerType; | 26 PointerType primaryPointerType; |
26 int availablePointerTypes; | 27 int availablePointerTypes; |
27 HoverType primaryHoverType; | 28 HoverType primaryHoverType; |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 struct CrossThreadCopier<MediaValuesCached::MediaValuesCachedData> { | 116 struct CrossThreadCopier<MediaValuesCached::MediaValuesCachedData> { |
116 typedef MediaValuesCached::MediaValuesCachedData Type; | 117 typedef MediaValuesCached::MediaValuesCachedData Type; |
117 static Type copy(const MediaValuesCached::MediaValuesCachedData& data) { | 118 static Type copy(const MediaValuesCached::MediaValuesCachedData& data) { |
118 return data.deepCopy(); | 119 return data.deepCopy(); |
119 } | 120 } |
120 }; | 121 }; |
121 | 122 |
122 } // namespace blink | 123 } // namespace blink |
123 | 124 |
124 #endif // MediaValuesCached_h | 125 #endif // MediaValuesCached_h |
OLD | NEW |