OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "ui/aura/monitor_aura.h" |
| 6 |
| 7 #include "ui/gfx/monitor.h" |
| 8 |
| 9 namespace aura { |
| 10 |
| 11 MonitorAura::MonitorAura() : device_scale_factor_(1.0f) { |
| 12 } |
| 13 |
| 14 MonitorAura::MonitorAura(const gfx::Rect& bounds) |
| 15 : bounds_(bounds), device_scale_factor_(1.0f) { |
| 16 } |
| 17 |
| 18 MonitorAura::~MonitorAura() { |
| 19 } |
| 20 |
| 21 void MonitorAura::CopyTo(gfx::Monitor* monitor_out) const { |
| 22 // TODO(oshima): For m19, the origin of work area/monitor bounds for |
| 23 // views/aura is always (0,0) because it's simple and enough. Fix this when |
| 24 // real multi monitor support is implemented. |
| 25 gfx::Rect bounds(bounds_.size()); |
| 26 monitor_out->set_bounds(bounds); |
| 27 bounds.Inset(work_area_insets_); |
| 28 monitor_out->set_work_area(bounds); |
| 29 monitor_out->set_device_scale_factor(device_scale_factor_); |
| 30 } |
| 31 |
| 32 } // namespace aura |
OLD | NEW |