Chromium Code Reviews| Index: Source/core/css/MediaValuesCached.h |
| diff --git a/Source/core/css/MediaValuesCached.h b/Source/core/css/MediaValuesCached.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..f475ed2b3f987528b4e07665718e1efd5c05bcd9 |
| --- /dev/null |
| +++ b/Source/core/css/MediaValuesCached.h |
| @@ -0,0 +1,63 @@ |
| +// Copyright 2014 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef MediaValuesCached_h |
| +#define MediaValuesCached_h |
| + |
| +#include "core/css/MediaValues.h" |
| + |
| +namespace WebCore { |
| + |
| +class MediaValuesCached : public MediaValues { |
|
eseidel
2014/04/14 23:10:13
Please mark the class as FINAL.
|
| +public: |
| + static PassRefPtr<MediaValues> create(LocalFrame*, RenderStyle*); |
| + static PassRefPtr<MediaValues> create(MediaValuesInitializer&); |
| + virtual PassRefPtr<MediaValues> copy() const; |
| + virtual bool isSafeToSendToAnotherThread() const; |
|
eseidel
2014/04/14 23:10:13
These are all OVERRIDE.
|
| + virtual bool computeLength(CSSPrimitiveValue&, int& result) const; |
| + |
| + virtual int viewportWidth() const; |
| + virtual int viewportHeight() const; |
| + virtual int deviceWidth() const; |
| + virtual int deviceHeight() const; |
| + virtual float devicePixelRatio() const; |
| + virtual int colorBitsPerComponent() const; |
| + virtual int monochromeBitsPerComponent() const; |
| + virtual PointerDeviceType pointer() const; |
| + virtual bool threeDEnabled() const; |
| + virtual bool scanMediaType() const; |
| + virtual bool screenMediaType() const; |
| + virtual bool printMediaType() const; |
| + virtual bool strictMode() const; |
| + virtual Document* document() const; |
| + virtual bool hasValues() const; |
| + |
| +protected: |
| + MediaValuesCached(LocalFrame*, RenderStyle*); |
| + MediaValuesCached(MediaValuesInitializer&); |
| + |
| + // Members variables beyond this point must be thread safe, since they're copied to the parser thread |
| + int m_viewportWidth; |
| + int m_viewportHeight; |
| + int m_deviceWidth; |
| + int m_deviceHeight; |
| + float m_devicePixelRatio; |
| + int m_colorBitsPerComponent; |
| + int m_monochromeBitsPerComponent; |
| + PointerDeviceType m_pointer; |
| + int m_defaultFontSize; |
| + int m_computedFontSize; |
| + bool m_hasXHeight; |
| + double m_xHeight; |
| + double m_zeroWidth; |
| + bool m_threeDEnabled; |
| + bool m_scanMediaType; |
| + bool m_screenMediaType; |
| + bool m_printMediaType; |
| + bool m_strictMode; |
| +}; |
| + |
| +} // namespace |
| + |
| +#endif // MediaValuesCached_h |