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

Side by Side Diff: ui/gfx/display.h

Issue 11953054: Fix high-DPI on Windows to make use of DIP scaling in WebKit. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Remove experimental changes to resource handling. Created 7 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 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 UI_GFX_DISPLAY_H_ 5 #ifndef UI_GFX_DISPLAY_H_
6 #define UI_GFX_DISPLAY_H_ 6 #define UI_GFX_DISPLAY_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "ui/base/ui_export.h" 10 #include "ui/base/ui_export.h"
11 #include "ui/gfx/rect.h" 11 #include "ui/gfx/rect.h"
12 12
13 namespace gfx { 13 namespace gfx {
14 14
15 // Note: The screen and display currently uses pixel coordinate 15 // Note: The screen and display currently uses pixel coordinate
16 // system. For platforms that support DIP (density independent pixel), 16 // system. For platforms that support DIP (density independent pixel),
17 // |bounds()| and |work_area| will return values in DIP coordinate 17 // |bounds()| and |work_area| will return values in DIP coordinate
18 // system, not in backing pixels. 18 // system, not in backing pixels.
19 class UI_EXPORT Display { 19 class UI_EXPORT Display {
20 public: 20 public:
21 // Creates a display with kInvalidDisplayID as default. 21 // Creates a display with kInvalidDisplayID as default.
22 Display(); 22 Display();
23 explicit Display(int64 id); 23 explicit Display(int64 id);
24 Display(int64 id, const Rect& bounds); 24 Display(int64 id, const Rect& bounds);
25 ~Display(); 25 ~Display();
26 26
27 // Returns the forced device scale factor, which is given by 27 // Returns the forced device scale factor, which is given by
28 // "--force-device-scale-factor". 28 // "--force-device-scale-factor".
29 static float GetForcedDeviceScaleFactor(); 29 static float GetForcedDeviceScaleFactor();
30 static bool HasForceDeviceScaleFactor();
pkotwicz 2013/01/23 19:39:23 Add a comment for HasForceDeviceScaleFactor().
kevers 2013/01/23 21:37:00 Done.
30 31
31 // Returns 64-bit persistent ID for the specified manufacturer's ID and 32 // Returns 64-bit persistent ID for the specified manufacturer's ID and
32 // serial#. 33 // serial#.
33 static int64 GetID(uint16 manufacturer_id, uint32 serial_number); 34 static int64 GetID(uint16 manufacturer_id, uint32 serial_number);
34 35
35 // Sets/Gets unique identifier associated with the display. 36 // Sets/Gets unique identifier associated with the display.
36 // -1 means invalid display and it doesn't not exit. 37 // -1 means invalid display and it doesn't not exit.
37 int64 id() const { return id_; } 38 int64 id() const { return id_; }
38 void set_id(int64 id) { id_ = id; } 39 void set_id(int64 id) { id_ = id; }
39 40
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 Rect work_area_; 99 Rect work_area_;
99 #if defined(USE_AURA) 100 #if defined(USE_AURA)
100 Rect bounds_in_pixel_; 101 Rect bounds_in_pixel_;
101 #endif 102 #endif
102 float device_scale_factor_; 103 float device_scale_factor_;
103 }; 104 };
104 105
105 } // namespace gfx 106 } // namespace gfx
106 107
107 #endif // UI_GFX_DISPLAY_H_ 108 #endif // UI_GFX_DISPLAY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698