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

Side by Side Diff: ash/display/display_info.h

Issue 417113012: Introduce user customization of external HighDPI mode for 4K monitor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: polish Created 6 years, 4 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef ASH_DISPLAY_DISPLAY_INFO_H_ 5 #ifndef ASH_DISPLAY_DISPLAY_INFO_H_
6 #define ASH_DISPLAY_DISPLAY_INFO_H_ 6 #define ASH_DISPLAY_DISPLAY_INFO_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "ash/ash_export.h" 11 #include "ash/ash_export.h"
12 #include "ui/display/types/display_constants.h" 12 #include "ui/display/types/display_constants.h"
13 #include "ui/gfx/display.h" 13 #include "ui/gfx/display.h"
14 #include "ui/gfx/insets.h" 14 #include "ui/gfx/insets.h"
15 #include "ui/gfx/rect.h" 15 #include "ui/gfx/rect.h"
16 16
17 namespace ash { 17 namespace ash {
18 18
19 // A struct that represents the display's mode info. 19 // A struct that represents the display's mode info.
20 struct ASH_EXPORT DisplayMode { 20 struct ASH_EXPORT DisplayMode {
21 DisplayMode(); 21 DisplayMode();
22 DisplayMode(const gfx::Size& size, 22 DisplayMode(const gfx::Size& size,
23 float refresh_rate, 23 float refresh_rate,
24 bool interlaced, 24 bool interlaced,
25 bool native); 25 bool native);
26 26
27 // Returns the size in DIP which isvisible to the user.
28 gfx::Size GetSizeInDIP() const;
29
27 gfx::Size size; // Physical pixel size of the display. 30 gfx::Size size; // Physical pixel size of the display.
28 float refresh_rate; // Refresh rate of the display, in Hz. 31 float refresh_rate; // Refresh rate of the display, in Hz.
29 bool interlaced; // True if mode is interlaced. 32 bool interlaced; // True if mode is interlaced.
30 bool native; // True if mode is native mode of the display. 33 bool native; // True if mode is native mode of the display.
34 float ui_scale; // The UI scale factor of the mode.
35 // TODO(mukai|oshima): merge to device_scale_factor.
36 float device_scale_factor; // The device scale factor of the mode.
31 }; 37 };
32 38
33 // DisplayInfo contains metadata for each display. This is used to 39 // DisplayInfo contains metadata for each display. This is used to
34 // create |gfx::Display| as well as to maintain extra infomation 40 // create |gfx::Display| as well as to maintain extra infomation
35 // to manage displays in ash environment. 41 // to manage displays in ash environment.
36 // This class is intentionally made copiable. 42 // This class is intentionally made copiable.
37 class ASH_EXPORT DisplayInfo { 43 class ASH_EXPORT DisplayInfo {
38 public: 44 public:
39 // Creates a DisplayInfo from string spec. 100+200-1440x800 creates display 45 // Creates a DisplayInfo from string spec. 100+200-1440x800 creates display
40 // whose size is 1440x800 at the location (100, 200) in host coordinates. 46 // whose size is 1440x800 at the location (100, 200) in host coordinates.
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 // The current profile of the color calibration. 257 // The current profile of the color calibration.
252 ui::ColorCalibrationProfile color_profile_; 258 ui::ColorCalibrationProfile color_profile_;
253 259
254 // The list of available variations for the color calibration. 260 // The list of available variations for the color calibration.
255 std::vector<ui::ColorCalibrationProfile> available_color_profiles_; 261 std::vector<ui::ColorCalibrationProfile> available_color_profiles_;
256 }; 262 };
257 263
258 } // namespace ash 264 } // namespace ash
259 265
260 #endif // ASH_DISPLAY_DISPLAY_INFO_H_ 266 #endif // ASH_DISPLAY_DISPLAY_INFO_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698