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

Side by Side Diff: ui/gfx/monitor.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 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/gfx/monitor.h"
6
7 namespace gfx {
8
9 Monitor::Monitor() {
10 }
11
12 Monitor::~Monitor() {
13 }
14
15 Size Monitor::GetSize() const {
16 return GetBounds().size();
17 }
18
19 Size Monitor::GetWorkAreaSize() const {
20 return GetWorkArea().size();
21 }
22
23 SimpleMonitor::SimpleMonitor()
24 : bounds_(gfx::Rect(0, 0, 1, 1)),
25 work_area_(bounds_) {
26 }
27
28 SimpleMonitor::SimpleMonitor(const gfx::Rect& bounds)
29 : bounds_(bounds),
30 work_area_(bounds) {
31 }
32
33 SimpleMonitor::~SimpleMonitor() {
34 }
35
36 Rect SimpleMonitor::GetBounds() const {
37 return bounds_;
38 }
39
40 Rect SimpleMonitor::GetWorkArea() const {
41 return work_area_;
42 }
43
44 float SimpleMonitor::GetDeviceScaleFactor() const {
45 return 1.0;
46 }
47
48 } // namespace gfx
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698