| Index: ui/aura/monitor_aura.h
|
| diff --git a/ui/aura/monitor.h b/ui/aura/monitor_aura.h
|
| similarity index 65%
|
| rename from ui/aura/monitor.h
|
| rename to ui/aura/monitor_aura.h
|
| index 496263efcaa04b4e3bf07cd4b401177bc55f0a93..9a69f3093fa730d016dae582b685d1a6d30f0691 100644
|
| --- a/ui/aura/monitor.h
|
| +++ b/ui/aura/monitor_aura.h
|
| @@ -9,14 +9,15 @@
|
| #include "base/basictypes.h"
|
| #include "ui/aura/aura_export.h"
|
| #include "ui/gfx/insets.h"
|
| +#include "ui/gfx/monitor.h"
|
| #include "ui/gfx/rect.h"
|
|
|
| namespace aura {
|
|
|
| -class AURA_EXPORT Monitor {
|
| +class AURA_EXPORT MonitorAura : public gfx::Monitor {
|
| public:
|
| - Monitor();
|
| - ~Monitor();
|
| + MonitorAura();
|
| + virtual ~MonitorAura();
|
|
|
| // Sets/gets monitor's bounds in |gfx::screen|'s coordinates,
|
| // which is relative to the primary screen's origin.
|
| @@ -33,17 +34,15 @@ 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;
|
| + // gfx::Monitor overrides:
|
| + virtual gfx::Rect GetBounds() const OVERRIDE;
|
| + virtual gfx::Rect GetWorkArea() const OVERRIDE;
|
| + virtual float GetDeviceScaleFactor() const OVERRIDE;
|
|
|
| private:
|
| // Insets for the work area.
|
| @@ -53,9 +52,9 @@ class AURA_EXPORT Monitor {
|
|
|
| float device_scale_factor_;
|
|
|
| - DISALLOW_COPY_AND_ASSIGN(Monitor);
|
| + DISALLOW_COPY_AND_ASSIGN(MonitorAura);
|
| };
|
|
|
| -} // namespace aura
|
| +} // namespace gfx
|
|
|
| -#endif // UI_AURA_MONITOR_H_
|
| +#endif // UI_GFX_MONITOR_H_
|
|
|