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

Side by Side Diff: ui/gfx/android/device_display_info.h

Issue 2623653002: android: Remove DeviceDisplayInfo (Closed)
Patch Set: rebase Created 3 years, 11 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
« no previous file with comments | « ui/gfx/BUILD.gn ('k') | ui/gfx/android/device_display_info.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2012 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 UI_GFX_ANDROID_DEVICE_DISPLAY_INFO_H_
6 #define UI_GFX_ANDROID_DEVICE_DISPLAY_INFO_H_
7
8 #include <jni.h>
9 #include <string>
10
11 #include "base/macros.h"
12 #include "ui/gfx/gfx_export.h"
13
14 namespace gfx {
15
16 // Facilitates access to device information typically only
17 // available using the Android SDK, including Display properties.
18 class GFX_EXPORT DeviceDisplayInfo {
19 public:
20 DeviceDisplayInfo();
21 ~DeviceDisplayInfo();
22
23 // Returns display height in physical pixels.
24 int GetDisplayHeight() const;
25
26 // Returns display width in physical pixels.
27 int GetDisplayWidth() const;
28
29 // Returns real display height in physical pixels.
30 // This version does not subtract window decorations etc.
31 // WARNING: This is only supported on JB-MR1 (sdk >= 17). Either
32 // check the SDK-level, or check for '0' being returned.
33 int GetPhysicalDisplayHeight() const;
34
35 // Returns real display width in physical pixels.
36 // This version does not subtract window decorations etc.
37 // WARNING: This is only supported on JB-MR1 (sdk >= 17). Either
38 // check the SDK-level, or check for '0' being returned.
39 int GetPhysicalDisplayWidth() const;
40
41 // Returns number of bits per pixel.
42 int GetBitsPerPixel() const;
43
44 // Returns number of bits per component.
45 int GetBitsPerComponent() const;
46
47 // Returns a scaling factor for Density Independent Pixel unit
48 // (1.0 is 160dpi, 0.75 is 120dpi, 2.0 is 320dpi).
49 double GetDIPScale() const;
50
51 // Smallest possible screen size in density-independent pixels.
52 int GetSmallestDIPWidth() const;
53
54 // Returns the display rotation angle from its natural orientation. Expected
55 // values are one of { 0, 90, 180, 270 }.
56 // See DeviceDispayInfo.java for more information.
57 int GetRotationDegrees() const;
58
59 private:
60 DISALLOW_COPY_AND_ASSIGN(DeviceDisplayInfo);
61 };
62
63 } // namespace gfx
64
65 #endif // UI_GFX_ANDROID_DEVICE_DISPLAY_INFO_H_
OLDNEW
« no previous file with comments | « ui/gfx/BUILD.gn ('k') | ui/gfx/android/device_display_info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698