diff options
author | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-28 20:19:54 +0000 |
---|---|---|
committer | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-28 20:19:54 +0000 |
commit | 82838b02f4b0943196f7e7b4ac7fca78885cbe54 (patch) | |
tree | a98be86ffa39b206dd839bb6ebefcc59bafc6c48 /views/window/window_gtk.h | |
parent | 6affd92124f01ee0eb2b75af96d4ab5576cbccf2 (diff) | |
download | chromium_src-82838b02f4b0943196f7e7b4ac7fca78885cbe54.zip chromium_src-82838b02f4b0943196f7e7b4ac7fca78885cbe54.tar.gz chromium_src-82838b02f4b0943196f7e7b4ac7fca78885cbe54.tar.bz2 |
Pulls ActiveWindowWatcher into app so that we can use it in
views. Converts from using notification server to observer as
notification service is chrome only.
Also changes the pointer type used by window_gtk to be a left arrow.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/245016
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27398 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/window/window_gtk.h')
-rw-r--r-- | views/window/window_gtk.h | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/views/window/window_gtk.h b/views/window/window_gtk.h index 74482ad..5149f60 100644 --- a/views/window/window_gtk.h +++ b/views/window/window_gtk.h @@ -5,6 +5,7 @@ #ifndef VIEWS_WINDOW_WINDOW_GTK_H_ #define VIEWS_WINDOW_WINDOW_GTK_H_ +#include "app/active_window_watcher_x.h" #include "base/basictypes.h" #include "views/widget/widget_gtk.h" #include "views/window/window.h" @@ -20,7 +21,9 @@ class Client; class WindowDelegate; // Window implementation for GTK. -class WindowGtk : public WidgetGtk, public Window { +class WindowGtk : public WidgetGtk, + public Window, + public ActiveWindowWatcherX::Observer { public: virtual ~WindowGtk(); @@ -68,7 +71,11 @@ class WindowGtk : public WidgetGtk, public Window { virtual gboolean OnWindowStateEvent(GtkWidget* widget, GdkEventWindowState* event); + // Overriden from ActiveWindowWatcherX::Observer. + virtual void ActiveWindowChanged(GdkWindow* active_window); + // WindowGtk specific. + // Invoked when the active status changes. virtual void IsActiveChanged(); protected: @@ -85,9 +92,6 @@ class WindowGtk : public WidgetGtk, public Window { static gboolean CallConfigureEvent(GtkWidget* widget, GdkEventConfigure* event, WindowGtk* window_gtk); - static void CallIsActiveChanged(GtkWidget* widget, - GParamSpec* pspec, - WindowGtk* window_gtk); static gboolean CallWindowStateEvent(GtkWidget* widget, GdkEventWindowState* event, WindowGtk* window_gtk); @@ -118,9 +122,8 @@ class WindowGtk : public WidgetGtk, public Window { // Set to true if the window is in the process of closing. bool window_closed_; - // If true, IsActive returns true. This is set by DisableInactiveRendering - // to force the window to be treated as active even though it isn't. - bool force_active_; + // Are we active? + bool is_active_; DISALLOW_COPY_AND_ASSIGN(WindowGtk); }; |