summaryrefslogtreecommitdiffstats
path: root/chrome/browser/ui/gtk/zoom_bubble_gtk.h
diff options
context:
space:
mode:
authordbeam@chromium.org <dbeam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-12-26 22:00:25 +0000
committerdbeam@chromium.org <dbeam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-12-26 22:00:25 +0000
commit4b88ddac62bec4c723f3d844cf1b577d0d795453 (patch)
treef0ec7f65e2612a04fa7c986a8b8ec1456096136d /chrome/browser/ui/gtk/zoom_bubble_gtk.h
parentd4d245fc2988177f622d043592e349a0c603a950 (diff)
downloadchromium_src-4b88ddac62bec4c723f3d844cf1b577d0d795453.zip
chromium_src-4b88ddac62bec4c723f3d844cf1b577d0d795453.tar.gz
chromium_src-4b88ddac62bec4c723f3d844cf1b577d0d795453.tar.bz2
[zoom bubble] Handle entering/leaving/being in fullscreen on GTK.
This patch should: - hide the zoom bubble when toggling fullscreen - show a bubble without an arrow while in fullscreen This patch also: - changes ArrowLocationGtk to FrameStyle as it's a more appropriate name - renames all of the arrow locations to the equivalent frame styles - adds FIXED_TOP_LEFT, FIXED_TOP_RIGHT to the available frame styles - automatically flips bubbles in RTL to avoid making callers do this - fixes about ~3 callers that weren't flipping BUG=167365 Review URL: https://codereview.chromium.org/11553046 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@174636 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/ui/gtk/zoom_bubble_gtk.h')
-rw-r--r--chrome/browser/ui/gtk/zoom_bubble_gtk.h21
1 files changed, 14 insertions, 7 deletions
diff --git a/chrome/browser/ui/gtk/zoom_bubble_gtk.h b/chrome/browser/ui/gtk/zoom_bubble_gtk.h
index c4d8397..fe79917 100644
--- a/chrome/browser/ui/gtk/zoom_bubble_gtk.h
+++ b/chrome/browser/ui/gtk/zoom_bubble_gtk.h
@@ -5,6 +5,8 @@
#ifndef CHROME_BROWSER_UI_GTK_ZOOM_BUBBLE_GTK_H_
#define CHROME_BROWSER_UI_GTK_ZOOM_BUBBLE_GTK_H_
+#include <gtk/gtk.h>
+
#include "base/basictypes.h"
#include "base/timer.h"
#include "chrome/browser/ui/gtk/bubble/bubble_gtk.h"
@@ -18,13 +20,18 @@ class WebContents;
class ZoomBubbleGtk {
public:
- // Shows the zoom bubble, pointing at |anchor_widget|.
- static void Show(GtkWidget* anchor,
- content::WebContents* web_contents,
- bool auto_close);
+ // Shows the zoom bubble below |anchor_widget| with an arrow pointing at
+ // |anchor_widget|. If |anchor_widget| is a toplevel window, the bubble will
+ // fixed positioned in the top right of corner of the widget with no arrow.
+ static void ShowBubble(GtkWidget* anchor,
+ content::WebContents* web_contents,
+ bool auto_close);
- // Closes the zoom bubble.
- static void Close();
+ // Whether the zoom bubble is currently showing.
+ static bool IsShowing();
+
+ // Closes the zoom bubble (if there is one).
+ static void CloseBubble();
private:
ZoomBubbleGtk(GtkWidget* anchor,
@@ -44,7 +51,7 @@ class ZoomBubbleGtk {
void Refresh();
// Closes the zoom bubble.
- void CloseBubble();
+ void Close();
// Notified when the bubble is destroyed so this instance can be deleted.
CHROMEGTK_CALLBACK_0(ZoomBubbleGtk, void, OnDestroy);