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

Unified Diff: ui/aura/monitor_change_observer_x11.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: cleanup 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_change_observer_x11.cc
diff --git a/ui/aura/monitor_change_observer_x11.cc b/ui/aura/monitor_change_observer_x11.cc
index bb2904f1c2534982b08cd07f1ee21e75214ab31a..b35f9efbd7567fc4b5da6f0ef8023aa4f6429a69 100644
--- a/ui/aura/monitor_change_observer_x11.cc
+++ b/ui/aura/monitor_change_observer_x11.cc
@@ -15,8 +15,8 @@
#include "base/stl_util.h"
#include "ui/aura/env.h"
#include "ui/aura/dispatcher_linux.h"
-#include "ui/aura/monitor.h"
#include "ui/aura/monitor_manager.h"
+#include "ui/gfx/monitor.h"
namespace aura {
namespace internal {
@@ -31,7 +31,7 @@ XRRModeInfo* FindMode(XRRScreenResources* screen_resources, XID current_mode) {
return NULL;
}
-bool CompareMonitorY(const Monitor* lhs, const Monitor* rhs) {
+bool CompareMonitorY(const gfx::Monitor* lhs, const gfx::Monitor* rhs) {
return lhs->bounds().y() < rhs->bounds().y();
}
@@ -77,7 +77,7 @@ void MonitorChangeObserverX11::NotifyMonitorChange() {
crtc_info_map[crtc_id] = crtc_info;
}
- std::vector<const Monitor*> monitors;
+ std::vector<const gfx::Monitor*> monitors;
std::set<int> y_coords;
for (int o = 0; o < screen_resources->noutput; o++) {
XRROutputInfo *output_info =
@@ -98,9 +98,8 @@ void MonitorChangeObserverX11::NotifyMonitorChange() {
// Mirrored monitors have the same y coordinates.
if (y_coords.find(crtc_info->y) != y_coords.end())
continue;
- Monitor* monitor = new Monitor;
- monitor->set_bounds(gfx::Rect(crtc_info->x, crtc_info->y,
- mode->width, mode->height));
+ gfx::Monitor* monitor = new gfx::Monitor(
+ gfx::Rect(crtc_info->x, crtc_info->y, mode->width, mode->height));
monitors.push_back(monitor);
y_coords.insert(crtc_info->y);
XRRFreeOutputInfo(output_info);
« no previous file with comments | « ui/aura/monitor.cc ('k') | ui/aura/monitor_manager.h » ('j') | ui/aura/monitor_manager.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698