Index: ui/aura/monitor_aura.h |
diff --git a/ui/aura/monitor.h b/ui/aura/monitor_aura.h |
similarity index 56% |
rename from ui/aura/monitor.h |
rename to ui/aura/monitor_aura.h |
index f62a7810f9f99c58b6bd850f3de9a3212da1d23f..0d4e394658d432428012305790a890f750329739 100644 |
--- a/ui/aura/monitor.h |
+++ b/ui/aura/monitor_aura.h |
@@ -11,19 +11,17 @@ |
#include "ui/gfx/insets.h" |
#include "ui/gfx/rect.h" |
+namespace gfx { |
+class Monitor; |
+} |
+ |
namespace aura { |
-// Note: The screen and monitor currently uses pixels coordinate |
-// system. ENABLE_DIP macro (which is enabled with enable_dip=1 gyp |
-// flag) will make this inconsistent with views' coordinate system |
-// because views will use DIP coordinate system, which uses |
-// (1.0/device_scale_factor) scale of the pixel coordinate system. |
-// TODO(oshima): Change aura/screen to DIP coordinate system and |
-// update this comment. |
-class AURA_EXPORT Monitor { |
+class AURA_EXPORT MonitorAura { |
Ben Goodger (Google)
2012/04/13 19:57:19
What's the purpose of this class when you have gfx
oshima
2012/04/13 21:18:41
WorkArea is computed from bounds and insets on Aur
|
public: |
- Monitor(); |
- ~Monitor(); |
+ MonitorAura(); |
+ explicit MonitorAura(const gfx::Rect& bounds); |
+ virtual ~MonitorAura(); |
// Sets/gets monitor's bounds in |gfx::screen|'s coordinates, |
// which is relative to the primary screen's origin. |
@@ -40,21 +38,13 @@ class AURA_EXPORT Monitor { |
} |
const gfx::Insets& work_area_insets() const { return work_area_insets_; } |
- // Output device's pixel scale factor. This specifies how much the |
- // UI should be scaled when the actual output has more pixels than |
- // standard monitors (which is around 100~120dpi.) For aura, this |
- // value is either 1.0 or 2.0, but may return different values on |
- // other platforms. |
- float GetDeviceScaleFactor() const { |
- return device_scale_factor_; |
- } |
- |
+ // Sets the device scale factor. |
void set_device_scale_factor(float scale) { |
device_scale_factor_ = scale; |
} |
- // Returns the monitor's work area. |
- gfx::Rect GetWorkAreaBounds() const; |
+ // Copy the monitor info into |monitor_out|. |
+ void CopyTo(gfx::Monitor* monitor_out) const; |
private: |
// Insets for the work area. |
@@ -64,7 +54,7 @@ class AURA_EXPORT Monitor { |
float device_scale_factor_; |
- DISALLOW_COPY_AND_ASSIGN(Monitor); |
+ DISALLOW_COPY_AND_ASSIGN(MonitorAura); |
}; |
} // namespace aura |