Index: ui/aura/monitor_aura.cc |
diff --git a/ui/aura/monitor_aura.cc b/ui/aura/monitor_aura.cc |
new file mode 100644 |
index 0000000000000000000000000000000000000000..cceef4f5e0e6c288272722eb488fae3a73e28d9b |
--- /dev/null |
+++ b/ui/aura/monitor_aura.cc |
@@ -0,0 +1,32 @@ |
+// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#include "ui/aura/monitor_aura.h" |
+ |
+#include "ui/gfx/monitor.h" |
+ |
+namespace aura { |
+ |
+MonitorAura::MonitorAura() : device_scale_factor_(1.0f) { |
+} |
+ |
+MonitorAura::MonitorAura(const gfx::Rect& bounds) |
+ : bounds_(bounds), device_scale_factor_(1.0f) { |
+} |
+ |
+MonitorAura::~MonitorAura() { |
+} |
+ |
+void MonitorAura::CopyTo(gfx::Monitor* monitor_out) const { |
+ // TODO(oshima): For m19, the origin of work area/monitor bounds for |
+ // views/aura is always (0,0) because it's simple and enough. Fix this when |
+ // real multi monitor support is implemented. |
+ gfx::Rect bounds(bounds_.size()); |
+ monitor_out->set_bounds(bounds); |
+ bounds.Inset(work_area_insets_); |
+ monitor_out->set_work_area(bounds); |
+ monitor_out->set_device_scale_factor(device_scale_factor_); |
+} |
+ |
+} // namespace aura |