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

Unified Diff: content/browser/renderer_host/render_widget_host_view_gtk.h

Issue 10542134: Rely on losing focus, not on becoming unfullscreened, to destroy a fullscreen window. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix nits Created 8 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/renderer_host/render_widget_host_view_gtk.h
diff --git a/content/browser/renderer_host/render_widget_host_view_gtk.h b/content/browser/renderer_host/render_widget_host_view_gtk.h
index d727d33810a8ceb2abbfecb9d2e6e1738f7fcd8d..6b952232468a09960e94f6d1254f29402ab699ed 100644
--- a/content/browser/renderer_host/render_widget_host_view_gtk.h
+++ b/content/browser/renderer_host/render_widget_host_view_gtk.h
@@ -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 @@ typedef struct _GtkSelectionData GtkSelectionData;
// -----------------------------------------------------------------------------
class CONTENT_EXPORT RenderWidgetHostViewGtk
: public content::RenderWidgetHostViewBase,
- public BrowserAccessibilityDelegate {
+ public BrowserAccessibilityDelegate,
+ public ui::ActiveWindowWatcherXObserver {
public:
virtual ~RenderWidgetHostViewGtk();
@@ -127,6 +129,9 @@ class CONTENT_EXPORT RenderWidgetHostViewGtk
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 @@ class CONTENT_EXPORT RenderWidgetHostViewGtk
private:
friend class RenderWidgetHostViewGtkWidget;
- CHROMEGTK_CALLBACK_1(RenderWidgetHostViewGtk,
- gboolean,
- OnWindowStateEvent,
- GdkEventWindowState*);
-
CHROMEGTK_CALLBACK_0(RenderWidgetHostViewGtk,
void,
OnDestroy);
@@ -256,6 +256,9 @@ class CONTENT_EXPORT RenderWidgetHostViewGtk
// Is the widget fullscreen?
bool is_fullscreen_;
+ // Has the window ever been marked active?
+ 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.

Powered by Google App Engine
This is Rietveld 408576698