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

Side by Side Diff: ui/aura/monitor_change_observer_x11.cc

Issue 10441028: aura/cros: Rename MessagePump{X => AuraX11} and move the atom cache into it. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix compile error in file added in the interim Created 8 years, 6 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
« no previous file with comments | « ui/aura/dispatcher_linux.cc ('k') | ui/aura/root_window_host_linux.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 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/aura/monitor_change_observer_x11.h" 5 #include "ui/aura/monitor_change_observer_x11.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <vector> 10 #include <vector>
11 11
12 #include <X11/extensions/Xrandr.h> 12 #include <X11/extensions/Xrandr.h>
13 13
14 #include "base/message_pump_x.h" 14 #include "base/message_pump_aurax11.h"
15 #include "ui/aura/env.h" 15 #include "ui/aura/env.h"
16 #include "ui/aura/dispatcher_linux.h" 16 #include "ui/aura/dispatcher_linux.h"
17 #include "ui/aura/monitor_manager.h" 17 #include "ui/aura/monitor_manager.h"
18 #include "ui/compositor/dip_util.h" 18 #include "ui/compositor/dip_util.h"
19 #include "ui/gfx/monitor.h" 19 #include "ui/gfx/monitor.h"
20 20
21 namespace aura { 21 namespace aura {
22 namespace internal { 22 namespace internal {
23 23
24 namespace { 24 namespace {
(...skipping 14 matching lines...) Expand all
39 return NULL; 39 return NULL;
40 } 40 }
41 41
42 bool CompareMonitorY(const gfx::Monitor& lhs, const gfx::Monitor& rhs) { 42 bool CompareMonitorY(const gfx::Monitor& lhs, const gfx::Monitor& rhs) {
43 return lhs.bounds_in_pixel().y() > rhs.bounds_in_pixel().y(); 43 return lhs.bounds_in_pixel().y() > rhs.bounds_in_pixel().y();
44 } 44 }
45 45
46 } // namespace 46 } // namespace
47 47
48 MonitorChangeObserverX11::MonitorChangeObserverX11() 48 MonitorChangeObserverX11::MonitorChangeObserverX11()
49 : xdisplay_(base::MessagePumpX::GetDefaultXDisplay()), 49 : xdisplay_(base::MessagePumpAuraX11::GetDefaultXDisplay()),
50 x_root_window_(DefaultRootWindow(xdisplay_)), 50 x_root_window_(DefaultRootWindow(xdisplay_)),
51 xrandr_event_base_(0) { 51 xrandr_event_base_(0) {
52 XRRSelectInput(xdisplay_, x_root_window_, RRScreenChangeNotifyMask); 52 XRRSelectInput(xdisplay_, x_root_window_, RRScreenChangeNotifyMask);
53 int error_base_ignored; 53 int error_base_ignored;
54 XRRQueryExtension(xdisplay_, &xrandr_event_base_, &error_base_ignored); 54 XRRQueryExtension(xdisplay_, &xrandr_event_base_, &error_base_ignored);
55 static_cast<DispatcherLinux*>(Env::GetInstance()->GetDispatcher())-> 55 static_cast<DispatcherLinux*>(Env::GetInstance()->GetDispatcher())->
56 AddDispatcherForRootWindow(this); 56 AddDispatcherForRootWindow(this);
57 } 57 }
58 58
59 MonitorChangeObserverX11::~MonitorChangeObserverX11() { 59 MonitorChangeObserverX11::~MonitorChangeObserverX11() {
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 for (std::vector<gfx::Monitor>::iterator iter = monitors.begin(); 135 for (std::vector<gfx::Monitor>::iterator iter = monitors.begin();
136 iter != monitors.end(); ++iter, ++id) 136 iter != monitors.end(); ++iter, ++id)
137 (*iter).set_id(id); 137 (*iter).set_id(id);
138 138
139 Env::GetInstance()->monitor_manager() 139 Env::GetInstance()->monitor_manager()
140 ->OnNativeMonitorsChanged(monitors); 140 ->OnNativeMonitorsChanged(monitors);
141 } 141 }
142 142
143 } // namespace internal 143 } // namespace internal
144 } // namespace aura 144 } // namespace aura
OLDNEW
« no previous file with comments | « ui/aura/dispatcher_linux.cc ('k') | ui/aura/root_window_host_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698