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

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

Issue 10221028: Move DIP translation from ui/aura to ui/compositor (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: revert change i made by accident Created 8 years, 7 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) 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_MONITOR_H_ 5 #ifndef UI_GFX_MONITOR_H_
6 #define UI_GFX_MONITOR_H_ 6 #define UI_GFX_MONITOR_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
11 #include "ui/base/ui_export.h" 11 #include "ui/base/ui_export.h"
12 #include "ui/gfx/rect.h" 12 #include "ui/gfx/rect.h"
13 13
14 namespace gfx { 14 namespace gfx {
15 15
16 // Note: The screen and monitor currently uses pixel coordinate 16 // Note: The screen and monitor currently uses pixel coordinate
17 // system. With ENABLE_DIP macro (which is enabled with enable_dip=1 17 // system. For platforms that support DIP (density independent pixel),
18 // gyp flag), |bounds()| and |work_area| will return values in DIP 18 // |bounds()| and |work_area| will return values in DIP coordinate
19 // coordinate system, not in backing pixels. 19 // system, not in backing pixels.
20 // TODO(oshima): Update the comment when ENABLE_DIP macro is removed.
21 class UI_EXPORT Monitor { 20 class UI_EXPORT Monitor {
22 public: 21 public:
23 // Returns the default value for the device scale factor, which is 22 // Returns the default value for the device scale factor, which is
24 // given by "--default-device-scale-factor". 23 // given by "--default-device-scale-factor".
25 static float GetDefaultDeviceScaleFactor(); 24 static float GetDefaultDeviceScaleFactor();
26 25
27 // Creates a monitor with invalid id(-1) as default. 26 // Creates a monitor with invalid id(-1) as default.
28 Monitor(); 27 Monitor();
29 explicit Monitor(int id); 28 explicit Monitor(int id);
30 Monitor(int id, const Rect& bounds); 29 Monitor(int id, const Rect& bounds);
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 Rect work_area_; 88 Rect work_area_;
90 #if defined(USE_AURA) 89 #if defined(USE_AURA)
91 Rect bounds_in_pixel_; 90 Rect bounds_in_pixel_;
92 #endif 91 #endif
93 float device_scale_factor_; 92 float device_scale_factor_;
94 }; 93 };
95 94
96 } // namespace gfx 95 } // namespace gfx
97 96
98 #endif // UI_GFX_MONITOR_H_ 97 #endif // UI_GFX_MONITOR_H_
OLDNEW
« ui/gfx/compositor/layer_unittest.cc ('K') | « ui/gfx/insets_f.h ('k') | ui/gfx/monitor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698