Index: content/browser/renderer_host/render_widget_host_view_gtk.h |
=================================================================== |
--- content/browser/renderer_host/render_widget_host_view_gtk.h (revision 145972) |
+++ content/browser/renderer_host/render_widget_host_view_gtk.h (working copy) |
@@ -21,6 +21,7 @@ |
#include "ui/base/gtk/gtk_signal.h" |
#include "ui/base/gtk/gtk_signal_registrar.h" |
#include "ui/base/gtk/owned_widget_gtk.h" |
+#include "ui/base/x/active_window_watcher_x_observer.h" |
#include "ui/gfx/native_widget_types.h" |
#include "ui/gfx/point.h" |
#include "ui/gfx/rect.h" |
@@ -45,7 +46,8 @@ |
// ----------------------------------------------------------------------------- |
class CONTENT_EXPORT RenderWidgetHostViewGtk |
: public content::RenderWidgetHostViewBase, |
- public BrowserAccessibilityDelegate { |
+ public BrowserAccessibilityDelegate, |
+ public ui::ActiveWindowWatcherXObserver { |
public: |
virtual ~RenderWidgetHostViewGtk(); |
@@ -127,6 +129,9 @@ |
const std::vector<AccessibilityHostMsg_NotificationParams>& params) |
OVERRIDE; |
+ // ActiveWindowWatcherXObserver implementation. |
+ virtual void ActiveWindowChanged(GdkWindow* active_window) OVERRIDE; |
+ |
// If the widget is aligned with an edge of the monitor its on and the user |
// attempts to drag past that edge we track the number of times it has |
// occurred, so that we can force the widget to scroll when it otherwise |
@@ -172,11 +177,6 @@ |
private: |
friend class RenderWidgetHostViewGtkWidget; |
- CHROMEGTK_CALLBACK_1(RenderWidgetHostViewGtk, |
- gboolean, |
- OnWindowStateEvent, |
- GdkEventWindowState*); |
- |
CHROMEGTK_CALLBACK_0(RenderWidgetHostViewGtk, |
void, |
OnDestroy); |
@@ -256,6 +256,10 @@ |
// Is the widget fullscreen? |
bool is_fullscreen_; |
+ // Has the window ever been marked active? Only valid for fullscreen or |
+ // popup windows. |
+ bool made_active_; |
+ |
// Used to record the last position of the mouse. |
// While the mouse is locked, they store the last known position just as mouse |
// lock was entered. |