Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(86)

Side by Side Diff: content/public/common/screen_info.h

Issue 2317563004: Change blink::WebScreenInfo to content::ScreenInfo (Closed)
Patch Set: Fix Windows compile Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CONTENT_PUBLIC_COMMON_SCREEN_INFO_H_
6 #define CONTENT_PUBLIC_COMMON_SCREEN_INFO_H_
7
8 #include "content/public/common/screen_orientation_values.h"
9 #include "ui/gfx/geometry/rect.h"
10
11 namespace content {
12
13 // Information about the screen on which a RenderWidget is being displayed. This
14 // is the content counterpart to WebScreenInfo in blink.
15 struct ScreenInfo {
16 // Device scale factor. Specifies the ratio between physical and logical
17 // pixels.
18 float device_scale_factor = 1.f;
19
20 // The screen depth in bits per pixel
21 uint32_t depth = 0;
22
23 // The bits per colour component. This assumes that the colours are balanced
24 // equally.
25 uint32_t depth_per_component = 0;
26
27 // This can be true for black and white printers
28 bool is_monochrome = false;
29
30 // The display monitor rectangle in virtual-screen coordinates. Note that
31 // this may be negative.
32 gfx::Rect rect;
33
34 // The portion of the monitor's rectangle that can be used by applications.
35 gfx::Rect available_rect;
36
37 // The monitor's orientation.
38 ScreenOrientationValues orientation_type =
39 SCREEN_ORIENTATION_VALUES_DEFAULT;
40
41 // This is the orientation angle of the displayed content in degrees.
42 // It is the opposite of the physical rotation.
43 uint16_t orientation_angle = 0;
44
45 bool operator==(const ScreenInfo& other) const;
46 bool operator!=(const ScreenInfo& other) const;
47 };
48
49 } // namespace content
50
51 #endif // CONTENT_PUBLIC_COMMON_SCREEN_INFO_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698