OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "ui/gfx/screen.h" | 5 #include "ui/gfx/screen.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "ui/gfx/native_widget_types.h" | 8 #include "ui/gfx/native_widget_types.h" |
9 | 9 |
10 namespace gfx { | 10 namespace gfx { |
(...skipping 30 matching lines...) Expand all Loading... |
41 gfx::Rect Screen::GetMonitorWorkAreaNearestPoint(const gfx::Point& point) { | 41 gfx::Rect Screen::GetMonitorWorkAreaNearestPoint(const gfx::Point& point) { |
42 return instance_->GetMonitorWorkAreaNearestPointImpl(point); | 42 return instance_->GetMonitorWorkAreaNearestPointImpl(point); |
43 } | 43 } |
44 | 44 |
45 // static | 45 // static |
46 gfx::Rect Screen::GetMonitorAreaNearestPoint(const gfx::Point& point) { | 46 gfx::Rect Screen::GetMonitorAreaNearestPoint(const gfx::Point& point) { |
47 return instance_->GetMonitorAreaNearestPointImpl(point); | 47 return instance_->GetMonitorAreaNearestPointImpl(point); |
48 } | 48 } |
49 | 49 |
50 // static | 50 // static |
| 51 gfx::Rect Screen::GetPrimaryMonitorWorkArea() { |
| 52 return instance_->GetMonitorWorkAreaNearestPoint(gfx::Point()); |
| 53 } |
| 54 |
| 55 // static |
| 56 gfx::Rect Screen::GetPrimaryMonitorBounds() { |
| 57 return instance_->GetMonitorAreaNearestPoint(gfx::Point()); |
| 58 } |
| 59 |
| 60 // static |
| 61 gfx::Rect Screen::GetMonitorWorkAreaMatching(const gfx::Rect& match_rect) { |
| 62 return instance_->GetMonitorWorkAreaNearestPoint(gfx::Point()); |
| 63 } |
| 64 |
| 65 // static |
51 gfx::NativeWindow Screen::GetWindowAtCursorScreenPoint() { | 66 gfx::NativeWindow Screen::GetWindowAtCursorScreenPoint() { |
52 return instance_->GetWindowAtCursorScreenPointImpl(); | 67 return instance_->GetWindowAtCursorScreenPointImpl(); |
53 } | 68 } |
54 | 69 |
55 // static | 70 // static |
56 gfx::Size Screen::GetPrimaryMonitorSize() { | 71 gfx::Size Screen::GetPrimaryMonitorSize() { |
57 return instance_->GetPrimaryMonitorSizeImpl(); | 72 return instance_->GetPrimaryMonitorSizeImpl(); |
58 } | 73 } |
59 | 74 |
60 // static | 75 // static |
61 int Screen::GetNumMonitors() { | 76 int Screen::GetNumMonitors() { |
62 return instance_->GetNumMonitorsImpl(); | 77 return instance_->GetNumMonitorsImpl(); |
63 } | 78 } |
64 | 79 |
65 } // namespace gfx | 80 } // namespace gfx |
OLD | NEW |