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

Unified Diff: ui/aura/monitor_aura.cc

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.cc
diff --git a/ui/aura/monitor_aura.cc b/ui/aura/monitor_aura.cc
new file mode 100644
index 0000000000000000000000000000000000000000..89abcc6888d0334f44ba74983a03faba9b99c8cb
--- /dev/null
+++ b/ui/aura/monitor_aura.cc
@@ -0,0 +1,35 @@
+// 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"
+
+namespace aura {
+
+MonitorAura::MonitorAura() : device_scale_factor_(1.0f) {
+}
+
+MonitorAura::~MonitorAura() {
+}
+
+gfx::Rect MonitorAura::GetBounds() 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.
+ return gfx::Rect(bounds_.size());
+}
+
+gfx::Rect MonitorAura::GetWorkArea() const {
+ // TODO(oshima): For m19, work area/monitor bounds has (0,0) origin
+ // because it's simpler and enough. Fix this when real multi monitor
+ // support is implemented.
+ gfx::Rect bounds(bounds_.size());
+ bounds.Inset(work_area_insets_);
+ return bounds;
+}
+
+float MonitorAura::GetDeviceScaleFactor() const {
+ return device_scale_factor_;
+}
+
+} // namespace aura

Powered by Google App Engine
This is Rietveld 408576698