| 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..afd0a74010081cb04caa0c9804546d779da78e98
|
| --- /dev/null
|
| +++ b/Source/core/css/MediaValuesCached.h
|
| @@ -0,0 +1,64 @@
|
| +// 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 FINAL : public MediaValues {
|
| +public:
|
| + static PassRefPtr<MediaValues> create(Document&);
|
| + static PassRefPtr<MediaValues> create(LocalFrame*, RenderStyle*);
|
| + static PassRefPtr<MediaValues> create(MediaValuesInitializer&);
|
| + virtual PassRefPtr<MediaValues> copy() const OVERRIDE;
|
| + virtual bool isSafeToSendToAnotherThread() const OVERRIDE;
|
| + virtual bool computeLength(double value, unsigned short type, int& result) const OVERRIDE;
|
| +
|
| + virtual int viewportWidth() const OVERRIDE;
|
| + virtual int viewportHeight() const OVERRIDE;
|
| + virtual int deviceWidth() const OVERRIDE;
|
| + virtual int deviceHeight() const OVERRIDE;
|
| + virtual float devicePixelRatio() const OVERRIDE;
|
| + virtual int colorBitsPerComponent() const OVERRIDE;
|
| + virtual int monochromeBitsPerComponent() const OVERRIDE;
|
| + virtual PointerDeviceType pointer() const OVERRIDE;
|
| + virtual bool threeDEnabled() const OVERRIDE;
|
| + virtual bool scanMediaType() const OVERRIDE;
|
| + virtual bool screenMediaType() const OVERRIDE;
|
| + virtual bool printMediaType() const OVERRIDE;
|
| + virtual bool strictMode() const OVERRIDE;
|
| + virtual Document* document() const OVERRIDE;
|
| + virtual bool hasValues() const OVERRIDE;
|
| +
|
| +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
|
|
|