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

Unified Diff: ui/aura/monitor_aura.h

Issue 9960042: Refactor screen/monitor so that gfx::Screen returns monitor object. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix command line Created 8 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: ui/aura/monitor_aura.h
diff --git a/ui/aura/monitor.h b/ui/aura/monitor_aura.h
similarity index 66%
rename from ui/aura/monitor.h
rename to ui/aura/monitor_aura.h
index 5f04188339a80cf9183b119d5e2abe47a32d578a..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,8 +34,15 @@ class AURA_EXPORT Monitor {
}
const gfx::Insets& work_area_insets() const { return work_area_insets_; }
- // Returns the monitor's work area.
- gfx::Rect GetWorkAreaBounds() const;
+ // Sets the device scale factor.
+ void set_device_scale_factor(float scale) {
+ device_scale_factor_ = scale;
+ }
+
+ // 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.
@@ -42,9 +50,11 @@ class AURA_EXPORT Monitor {
gfx::Rect bounds_;
- DISALLOW_COPY_AND_ASSIGN(Monitor);
+ float device_scale_factor_;
+
+ DISALLOW_COPY_AND_ASSIGN(MonitorAura);
};
-} // namespace aura
+} // namespace gfx
-#endif // UI_AURA_MONITOR_H_
+#endif // UI_GFX_MONITOR_H_

Powered by Google App Engine
This is Rietveld 408576698