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 namespace aura { |
| 8 |
| 9 MonitorAura::MonitorAura() : device_scale_factor_(1.0f) { |
| 10 } |
| 11 |
| 12 MonitorAura::~MonitorAura() { |
| 13 } |
| 14 |
| 15 gfx::Rect MonitorAura::GetBounds() const { |
| 16 // TODO(oshima): For m19, the origin of work area/monitor bounds for |
| 17 // views/aura is always (0,0) because it's simple and enough. Fix this when |
| 18 // real multi monitor support is implemented. |
| 19 return gfx::Rect(bounds_.size()); |
| 20 } |
| 21 |
| 22 gfx::Rect MonitorAura::GetWorkArea() const { |
| 23 // TODO(oshima): For m19, work area/monitor bounds has (0,0) origin |
| 24 // because it's simpler and enough. Fix this when real multi monitor |
| 25 // support is implemented. |
| 26 gfx::Rect bounds(bounds_.size()); |
| 27 bounds.Inset(work_area_insets_); |
| 28 return bounds; |
| 29 } |
| 30 |
| 31 float MonitorAura::GetDeviceScaleFactor() const { |
| 32 return device_scale_factor_; |
| 33 } |
| 34 |
| 35 } // namespace aura |
OLD | NEW |