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

Side by Side Diff: ui/base/x/active_window_watcher_x.cc

Issue 6257006: Move a bunch of random other files to src/ui/base... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 11 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/base/x/active_window_watcher_x.h ('k') | ui/base/x/x11_util.h » ('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) 2009 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 <X11/Xlib.h> 5 #include <X11/Xlib.h>
6 #include <gdk/gdk.h> 6 #include <gdk/gdk.h>
7 #include <gdk/gdkx.h> 7 #include <gdk/gdkx.h>
8 8
9 #include "app/active_window_watcher_x.h" 9 #include "ui/base/x/active_window_watcher_x.h"
10
11 namespace ui {
10 12
11 static Atom kNetActiveWindowAtom = None; 13 static Atom kNetActiveWindowAtom = None;
12 14
13 // static 15 // static
14 ActiveWindowWatcherX* ActiveWindowWatcherX::GetInstance() { 16 ActiveWindowWatcherX* ActiveWindowWatcherX::GetInstance() {
15 return Singleton<ActiveWindowWatcherX>::get(); 17 return Singleton<ActiveWindowWatcherX>::get();
16 } 18 }
17 19
18 // static 20 // static
19 void ActiveWindowWatcherX::AddObserver(Observer* observer) { 21 void ActiveWindowWatcherX::AddObserver(Observer* observer) {
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 window_watcher); 95 window_watcher);
94 XEvent* xev = static_cast<XEvent*>(xevent); 96 XEvent* xev = static_cast<XEvent*>(xevent);
95 97
96 if (xev->xany.type == PropertyNotify && 98 if (xev->xany.type == PropertyNotify &&
97 xev->xproperty.atom == kNetActiveWindowAtom) { 99 xev->xproperty.atom == kNetActiveWindowAtom) {
98 watcher->NotifyActiveWindowChanged(); 100 watcher->NotifyActiveWindowChanged();
99 } 101 }
100 102
101 return GDK_FILTER_CONTINUE; 103 return GDK_FILTER_CONTINUE;
102 } 104 }
105
106 } // namespace ui
OLDNEW
« no previous file with comments | « ui/base/x/active_window_watcher_x.h ('k') | ui/base/x/x11_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698