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

Side by Side Diff: ui/aura/dispatcher_linux.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/demo/demo_main.cc ('k') | ui/aura/monitor_change_observer_x11.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/dispatcher_linux.h" 5 #include "ui/aura/dispatcher_linux.h"
6 6
7 #include <X11/extensions/XInput2.h> 7 #include <X11/extensions/XInput2.h>
8 8
9 #include "ui/base/events.h" 9 #include "ui/base/events.h"
10 10
(...skipping 21 matching lines...) Expand all
32 } 32 }
33 } 33 }
34 } 34 }
35 35
36 } // namespace 36 } // namespace
37 37
38 namespace aura { 38 namespace aura {
39 39
40 DispatcherLinux::DispatcherLinux() 40 DispatcherLinux::DispatcherLinux()
41 : x_root_window_( 41 : x_root_window_(
42 DefaultRootWindow(base::MessagePumpX::GetDefaultXDisplay())) { 42 DefaultRootWindow(base::MessagePumpAuraX11::GetDefaultXDisplay())) {
43 base::MessagePumpX::SetDefaultDispatcher(this); 43 base::MessagePumpAuraX11::SetDefaultDispatcher(this);
44 MessageLoopForUI::current()->AddObserver(this); 44 MessageLoopForUI::current()->AddObserver(this);
45 } 45 }
46 46
47 DispatcherLinux::~DispatcherLinux() { 47 DispatcherLinux::~DispatcherLinux() {
48 MessageLoopForUI::current()->RemoveObserver(this); 48 MessageLoopForUI::current()->RemoveObserver(this);
49 base::MessagePumpX::SetDefaultDispatcher(NULL); 49 base::MessagePumpAuraX11::SetDefaultDispatcher(NULL);
50 } 50 }
51 51
52 void DispatcherLinux::AddDispatcherForWindow( 52 void DispatcherLinux::AddDispatcherForWindow(
53 MessageLoop::Dispatcher* dispatcher, 53 MessageLoop::Dispatcher* dispatcher,
54 ::Window x_window) { 54 ::Window x_window) {
55 dispatchers_.insert(std::make_pair(x_window, dispatcher)); 55 dispatchers_.insert(std::make_pair(x_window, dispatcher));
56 } 56 }
57 57
58 void DispatcherLinux::RemoveDispatcherForWindow(::Window x_window) { 58 void DispatcherLinux::RemoveDispatcherForWindow(::Window x_window) {
59 dispatchers_.erase(x_window); 59 dispatchers_.erase(x_window);
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 } 125 }
126 DispatchersMap::const_iterator it = dispatchers_.find(x_window); 126 DispatchersMap::const_iterator it = dispatchers_.find(x_window);
127 return it != dispatchers_.end() ? it->second : NULL; 127 return it != dispatchers_.end() ? it->second : NULL;
128 } 128 }
129 129
130 MessageLoop::Dispatcher* CreateDispatcher() { 130 MessageLoop::Dispatcher* CreateDispatcher() {
131 return new DispatcherLinux; 131 return new DispatcherLinux;
132 } 132 }
133 133
134 } // namespace aura 134 } // namespace aura
OLDNEW
« no previous file with comments | « ui/aura/demo/demo_main.cc ('k') | ui/aura/monitor_change_observer_x11.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698