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

Unified Diff: chrome/browser/ui/gtk/fullscreen_exit_bubble_gtk.h

Issue 7549005: Abstract fullscreen exit bubble logic to bring Linux's behaviour in line with (Closed) Base URL: /usr/local/google/chromium2/src@trunk
Patch Set: Rebase attempt #3. Created 9 years, 4 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
« no previous file with comments | « chrome/browser/ui/gtk/browser_window_gtk.cc ('k') | chrome/browser/ui/gtk/fullscreen_exit_bubble_gtk.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/gtk/fullscreen_exit_bubble_gtk.h
diff --git a/chrome/browser/ui/gtk/fullscreen_exit_bubble_gtk.h b/chrome/browser/ui/gtk/fullscreen_exit_bubble_gtk.h
index 4a55ee094ec729eb8b0c25fc152821c939c796fa..a6fedf5360dd727b72a94596409c6b4a1563cbe3 100644
--- a/chrome/browser/ui/gtk/fullscreen_exit_bubble_gtk.h
+++ b/chrome/browser/ui/gtk/fullscreen_exit_bubble_gtk.h
@@ -6,7 +6,7 @@
#define CHROME_BROWSER_UI_GTK_FULLSCREEN_EXIT_BUBBLE_GTK_H_
#pragma once
-#include "base/timer.h"
+#include "chrome/browser/ui/fullscreen_exit_bubble.h"
#include "chrome/browser/ui/gtk/slide_animator_gtk.h"
#include "ui/base/gtk/gtk_signal.h"
#include "ui/base/gtk/gtk_signal_registrar.h"
@@ -16,22 +16,31 @@ typedef struct _GtkWidget GtkWidget;
// FullscreenExitBubbleGTK is responsible for showing a bubble atop the screen
// in fullscreen mode, telling users how to exit and providing a click target.
-class FullscreenExitBubbleGtk {
+class FullscreenExitBubbleGtk : public FullscreenExitBubble {
public:
// We place the bubble in |container|.
- explicit FullscreenExitBubbleGtk(GtkFloatingContainer* container);
+ FullscreenExitBubbleGtk(
+ GtkFloatingContainer* container,
+ CommandUpdater::CommandUpdaterDelegate* delegate);
virtual ~FullscreenExitBubbleGtk();
- void InitWidgets();
+ protected:
+ // FullScreenExitBubble
+ virtual gfx::Rect GetPopupRect(bool ignore_animation_state) const OVERRIDE;
+ virtual gfx::Point GetCursorScreenPoint() OVERRIDE;
+ virtual bool WindowContainsPoint(gfx::Point pos) OVERRIDE;
+ virtual bool IsWindowActive() OVERRIDE;
+ virtual void Hide() OVERRIDE;
+ virtual void Show() OVERRIDE;
+ virtual bool IsAnimating() OVERRIDE;
private:
+ void InitWidgets();
+
GtkWidget* widget() const {
return slide_widget_->widget();
}
- // Hide the exit bubble.
- void Hide();
-
CHROMEGTK_CALLBACK_1(FullscreenExitBubbleGtk, void, OnSetFloatingPosition,
GtkAllocation*);
CHROMEGTK_CALLBACK_0(FullscreenExitBubbleGtk, void, OnLinkClicked);
@@ -39,6 +48,9 @@ class FullscreenExitBubbleGtk {
// A pointer to the floating container that is our parent.
GtkFloatingContainer* container_;
+ // The widget that contains the link.
+ OwnedWidgetGtk link_container_;
+
// The widget that animates the slide-out of fullscreen exit bubble.
scoped_ptr<SlideAnimatorGtk> slide_widget_;
« no previous file with comments | « chrome/browser/ui/gtk/browser_window_gtk.cc ('k') | chrome/browser/ui/gtk/fullscreen_exit_bubble_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698