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

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

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/view_prop_unittest.cc ('k') | ui/base/x/active_window_watcher_x.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) 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 #ifndef APP_ACTIVE_WINDOW_WATCHER_X_H_ 5 #ifndef UI_BASE_X_ACTIVE_WINDOW_WATCHER_X_H_
6 #define APP_ACTIVE_WINDOW_WATCHER_X_H_ 6 #define UI_BASE_X_ACTIVE_WINDOW_WATCHER_X_H_
7 #pragma once 7 #pragma once
8 8
9 #include <gdk/gdk.h> 9 #include <gdk/gdk.h>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "base/observer_list.h" 12 #include "base/observer_list.h"
13 #include "base/singleton.h" 13 #include "base/singleton.h"
14 14
15 namespace ui {
16
15 // This is a helper class that is used to keep track of which window the X 17 // This is a helper class that is used to keep track of which window the X
16 // window manager thinks is active. Add an Observer to listener for changes to 18 // window manager thinks is active. Add an Observer to listener for changes to
17 // the active window. 19 // the active window.
18 class ActiveWindowWatcherX { 20 class ActiveWindowWatcherX {
19 public: 21 public:
20 class Observer { 22 class Observer {
21 public: 23 public:
22 // |active_window| will be NULL if the active window isn't one of Chrome's. 24 // |active_window| will be NULL if the active window isn't one of Chrome's.
23 virtual void ActiveWindowChanged(GdkWindow* active_window) = 0; 25 virtual void ActiveWindowChanged(GdkWindow* active_window) = 0;
24 26
(...skipping 21 matching lines...) Expand all
46 // Callback for PropertyChange XEvents. 48 // Callback for PropertyChange XEvents.
47 static GdkFilterReturn OnWindowXEvent(GdkXEvent* xevent, 49 static GdkFilterReturn OnWindowXEvent(GdkXEvent* xevent,
48 GdkEvent* event, 50 GdkEvent* event,
49 gpointer window_watcher); 51 gpointer window_watcher);
50 52
51 ObserverList<Observer> observers_; 53 ObserverList<Observer> observers_;
52 54
53 DISALLOW_COPY_AND_ASSIGN(ActiveWindowWatcherX); 55 DISALLOW_COPY_AND_ASSIGN(ActiveWindowWatcherX);
54 }; 56 };
55 57
56 #endif // APP_ACTIVE_WINDOW_WATCHER_X_H_ 58 } // namespace ui
59
60 #endif // UI_BASE_X_ACTIVE_WINDOW_WATCHER_X_H_
OLDNEW
« no previous file with comments | « ui/base/view_prop_unittest.cc ('k') | ui/base/x/active_window_watcher_x.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698