blob: 7b62e5e7a88a1e8cffe095f3d8f84bd9143fa3dc [file] [log] [blame]
// 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 MediaValuesDynamic_h
#define MediaValuesDynamic_h
#include "core/css/MediaValues.h"
namespace blink {
class Document;
class CORE_EXPORT MediaValuesDynamic : public MediaValues {
static MediaValues* Create(Document&);
static MediaValues* Create(LocalFrame*);
MediaValues* Copy() const override;
bool ComputeLength(double value,
int& result) const override;
bool ComputeLength(double value,
double& result) const override;
double ViewportWidth() const override;
double ViewportHeight() const override;
int DeviceWidth() const override;
int DeviceHeight() const override;
float DevicePixelRatio() const override;
int ColorBitsPerComponent() const override;
int MonochromeBitsPerComponent() const override;
PointerType PrimaryPointerType() const override;
int AvailablePointerTypes() const override;
HoverType PrimaryHoverType() const override;
int AvailableHoverTypes() const override;
bool ThreeDEnabled() const override;
bool StrictMode() const override;
const String MediaType() const override;
WebDisplayMode DisplayMode() const override;
DisplayShape GetDisplayShape() const override;
ColorSpaceGamut ColorGamut() const override;
Document* GetDocument() const override;
bool HasValues() const override;
void OverrideViewportDimensions(double width, double height) override;
virtual void Trace(blink::Visitor*);
bool overridden_viewport_dimensions,
double viewport_width,
double viewport_height);
Member<LocalFrame> frame_;
bool viewport_dimensions_overridden_;
double viewport_width_override_;
double viewport_height_override_;
} // namespace blink
#endif // MediaValuesDynamic_h