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

Unified Diff: ui/base/x/active_window_watcher_x.h

Issue 8595003: Have panels respond to changes in work area on Linux. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Code review feedback. Created 9 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/panels/panel_browser_window_gtk.cc ('k') | ui/base/x/active_window_watcher_x.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/x/active_window_watcher_x.h
diff --git a/ui/base/x/active_window_watcher_x.h b/ui/base/x/active_window_watcher_x.h
index 4fa6b65898ddd21a540db0376f2bb3532672431a..05895c238e2e2a85620f1b0c49fd9c183c908a9f 100644
--- a/ui/base/x/active_window_watcher_x.h
+++ b/ui/base/x/active_window_watcher_x.h
@@ -8,16 +8,15 @@
#include <gdk/gdk.h>
-#include "base/basictypes.h"
dcheng 2011/11/18 23:02:29 This should remain for DISALLOW_COPY_AND_ASSIGN. T
prasadt 2011/11/21 23:36:49 Done.
#include "base/memory/singleton.h"
#include "base/observer_list.h"
-#include "ui/base/gtk/gtk_signal.h"
#include "ui/base/ui_export.h"
+#include "ui/base/x/x11_util.h"
namespace ui {
// This is a helper class that is used to keep track of which window the X
-// window manager thinks is active. Add an Observer to listener for changes to
+// window manager thinks is active. Add an Observer to listen for changes to
// the active window.
class UI_EXPORT ActiveWindowWatcherX {
public:
@@ -27,14 +26,20 @@ class UI_EXPORT ActiveWindowWatcherX {
virtual void ActiveWindowChanged(GdkWindow* active_window) = 0;
protected:
- virtual ~Observer() {}
+ virtual ~Observer();
};
static ActiveWindowWatcherX* GetInstance();
-
static void AddObserver(Observer* observer);
static void RemoveObserver(Observer* observer);
+ // Gets the atom for the default display for the propert this class is
dcheng 2011/11/18 23:02:29 property
prasadt 2011/11/21 23:36:49 Done.
+ // watching for.
+ static Atom GetPropertyAtom();
+
+ // Notify observers that the active window has changed.
+ static void Notify();
+
// Checks if the WM supports the active window property. Note that the return
// value can change, especially during system startup.
static bool WMSupportsActivation();
@@ -44,17 +49,8 @@ class UI_EXPORT ActiveWindowWatcherX {
ActiveWindowWatcherX();
~ActiveWindowWatcherX();
-
- void Init();
-
- // Sends a notification out through the NotificationService that the active
- // window has changed.
void NotifyActiveWindowChanged();
- // Callback for PropertyChange XEvents.
- CHROMEG_CALLBACK_1(ActiveWindowWatcherX, GdkFilterReturn,
- OnWindowXEvent, GdkXEvent*, GdkEvent*);
-
ObserverList<Observer> observers_;
DISALLOW_COPY_AND_ASSIGN(ActiveWindowWatcherX);
« no previous file with comments | « chrome/browser/ui/panels/panel_browser_window_gtk.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