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

Side by Side Diff: ui/views/widget/desktop_aura/x11_desktop_handler.h

Issue 14061025: ui: Use base::MessageLoop. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 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
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 #ifndef UI_VIEWS_WIDGET_DESKTOP_AURA_X11_DESKTOP_HANDLER_H_ 5 #ifndef UI_VIEWS_WIDGET_DESKTOP_AURA_X11_DESKTOP_HANDLER_H_
6 #define UI_VIEWS_WIDGET_DESKTOP_AURA_X11_DESKTOP_HANDLER_H_ 6 #define UI_VIEWS_WIDGET_DESKTOP_AURA_X11_DESKTOP_HANDLER_H_
7 7
8 #include <X11/Xlib.h> 8 #include <X11/Xlib.h>
9 // Get rid of a macro from Xlib.h that conflicts with Aura's RootWindow class. 9 // Get rid of a macro from Xlib.h that conflicts with Aura's RootWindow class.
10 #undef RootWindow 10 #undef RootWindow
11 11
12 #include "base/message_loop.h" 12 #include "base/message_loop.h"
13 #include "ui/aura/env_observer.h" 13 #include "ui/aura/env_observer.h"
14 #include "ui/base/x/x11_atom_cache.h" 14 #include "ui/base/x/x11_atom_cache.h"
15 #include "ui/views/views_export.h" 15 #include "ui/views/views_export.h"
16 16
17 template <typename T> struct DefaultSingletonTraits; 17 template <typename T> struct DefaultSingletonTraits;
18 18
19 namespace views { 19 namespace views {
20 20
21 // A singleton that owns global objects related to the desktop and listens for 21 // A singleton that owns global objects related to the desktop and listens for
22 // X11 events on the X11 root window. Destroys itself when aura::Env is 22 // X11 events on the X11 root window. Destroys itself when aura::Env is
23 // deleted. 23 // deleted.
24 class VIEWS_EXPORT X11DesktopHandler 24 class VIEWS_EXPORT X11DesktopHandler : public base::MessageLoop::Dispatcher,
25 : public MessageLoop::Dispatcher, 25 public aura::EnvObserver {
26 public aura::EnvObserver {
27 public: 26 public:
28 // Returns the singleton handler. 27 // Returns the singleton handler.
29 static X11DesktopHandler* get(); 28 static X11DesktopHandler* get();
30 29
31 // Sends a request to the window manager to activate |window|. 30 // Sends a request to the window manager to activate |window|.
32 void ActivateWindow(::Window window); 31 void ActivateWindow(::Window window);
33 32
34 // Checks if the current active window is |window|. 33 // Checks if the current active window is |window|.
35 bool IsActiveWindow(::Window window) const; 34 bool IsActiveWindow(::Window window) const;
36 35
(...skipping 21 matching lines...) Expand all
58 ::Window current_window_; 57 ::Window current_window_;
59 58
60 ui::X11AtomCache atom_cache_; 59 ui::X11AtomCache atom_cache_;
61 60
62 DISALLOW_COPY_AND_ASSIGN(X11DesktopHandler); 61 DISALLOW_COPY_AND_ASSIGN(X11DesktopHandler);
63 }; 62 };
64 63
65 } // namespace views 64 } // namespace views
66 65
67 #endif // UI_VIEWS_WIDGET_DESKTOP_AURA_X11_DESKTOP_HANDLER_H_ 66 #endif // UI_VIEWS_WIDGET_DESKTOP_AURA_X11_DESKTOP_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698