| Index: content/public/common/screen_info.h
|
| diff --git a/content/public/common/screen_info.h b/content/public/common/screen_info.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..ea3a57f673b9f9d393e1f804d6aa3ba55e91dbda
|
| --- /dev/null
|
| +++ b/content/public/common/screen_info.h
|
| @@ -0,0 +1,51 @@
|
| +// Copyright 2016 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 CONTENT_PUBLIC_COMMON_SCREEN_INFO_H_
|
| +#define CONTENT_PUBLIC_COMMON_SCREEN_INFO_H_
|
| +
|
| +#include "content/public/common/screen_orientation_values.h"
|
| +#include "ui/gfx/geometry/rect.h"
|
| +
|
| +namespace content {
|
| +
|
| +// Information about the screen on which a RenderWidget is being displayed. This
|
| +// is the content counterpart to WebScreenInfo in blink.
|
| +struct ScreenInfo {
|
| + // Device scale factor. Specifies the ratio between physical and logical
|
| + // pixels.
|
| + float device_scale_factor = 1.f;
|
| +
|
| + // The screen depth in bits per pixel
|
| + uint32_t depth = 0;
|
| +
|
| + // The bits per colour component. This assumes that the colours are balanced
|
| + // equally.
|
| + uint32_t depth_per_component = 0;
|
| +
|
| + // This can be true for black and white printers
|
| + bool is_monochrome = false;
|
| +
|
| + // The display monitor rectangle in virtual-screen coordinates. Note that
|
| + // this may be negative.
|
| + gfx::Rect rect;
|
| +
|
| + // The portion of the monitor's rectangle that can be used by applications.
|
| + gfx::Rect available_rect;
|
| +
|
| + // The monitor's orientation.
|
| + ScreenOrientationValues orientation_type =
|
| + SCREEN_ORIENTATION_VALUES_DEFAULT;
|
| +
|
| + // This is the orientation angle of the displayed content in degrees.
|
| + // It is the opposite of the physical rotation.
|
| + uint16_t orientation_angle = 0;
|
| +
|
| + bool operator==(const ScreenInfo& other) const;
|
| + bool operator!=(const ScreenInfo& other) const;
|
| +};
|
| +
|
| +} // namespace content
|
| +
|
| +#endif // CONTENT_PUBLIC_COMMON_SCREEN_INFO_H_
|
|
|