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

Side by Side 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: . 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698