| Index: chrome/browser/gtk/status_bubble_gtk.h
|
| diff --git a/chrome/browser/gtk/status_bubble_gtk.h b/chrome/browser/gtk/status_bubble_gtk.h
|
| index 87b43d32256490bd8619263eafefb10bb768246a..9784668c126deeae644a37920082fbb82c485712 100644
|
| --- a/chrome/browser/gtk/status_bubble_gtk.h
|
| +++ b/chrome/browser/gtk/status_bubble_gtk.h
|
| @@ -9,6 +9,7 @@
|
|
|
| #include <string>
|
|
|
| +#include "base/gfx/point.h"
|
| #include "base/scoped_ptr.h"
|
| #include "base/task.h"
|
| #include "chrome/browser/status_bubble.h"
|
| @@ -30,16 +31,19 @@ class StatusBubbleGtk : public StatusBubble,
|
| explicit StatusBubbleGtk(Profile* profile);
|
| virtual ~StatusBubbleGtk();
|
|
|
| + bool flip_horizontally() const { return flip_horizontally_; }
|
| + int y_offset() const { return y_offset_; }
|
| +
|
| // StatusBubble implementation.
|
| virtual void SetStatus(const std::wstring& status);
|
| virtual void SetURL(const GURL& url, const std::wstring& languages);
|
| virtual void Hide();
|
| - virtual void MouseMoved();
|
| + virtual void MouseMoved(const gfx::Point& location, bool left_content);
|
|
|
| // Called when the download shelf becomes visible or invisible.
|
| // This is used by to ensure that the status bubble does not obscure
|
| // the download shelf, when it is visible.
|
| - virtual void UpdateDownloadShelfVisibility(bool visible) { }
|
| + virtual void UpdateDownloadShelfVisibility(bool visible);
|
|
|
| // Overridden from NotificationObserver:
|
| void Observe(NotificationType type,
|
| @@ -69,6 +73,19 @@ class StatusBubbleGtk : public StatusBubble,
|
| // Notification from the window that we should retheme ourself.
|
| void UserChangedTheme();
|
|
|
| + // Sets whether the bubble should be flipped horizontally and displayed on the
|
| + // opposite side of the tab contents. Reshapes the container and queues a
|
| + // redraw if necessary.
|
| + void SetFlipHorizontally(bool flip_horizontally);
|
| +
|
| + static gboolean HandleMotionNotifyThunk(GtkWidget* widget,
|
| + GdkEventMotion* event,
|
| + gpointer user_data) {
|
| + return reinterpret_cast<StatusBubbleGtk*>(user_data)->
|
| + HandleMotionNotify(event);
|
| + }
|
| + gboolean HandleMotionNotify(GdkEventMotion* event);
|
| +
|
| NotificationRegistrar registrar_;
|
|
|
| // Provides colors.
|
| @@ -77,6 +94,9 @@ class StatusBubbleGtk : public StatusBubble,
|
| // The toplevel event box.
|
| OwnedWidgetGtk container_;
|
|
|
| + // The GtkAlignment holding |label_|.
|
| + GtkWidget* padding_;
|
| +
|
| // The GtkLabel holding the text.
|
| GtkWidget* label_;
|
|
|
| @@ -88,6 +108,17 @@ class StatusBubbleGtk : public StatusBubble,
|
|
|
| // A timer that hides our window after a delay.
|
| ScopedRunnableMethodFactory<StatusBubbleGtk> timer_factory_;
|
| +
|
| + // Should the bubble be flipped horizontally (e.g. displayed on the right for
|
| + // an LTR language)? We move the bubble to the other side of the tab contents
|
| + // rather than sliding it down when the download shelf is visible.
|
| + bool flip_horizontally_;
|
| +
|
| + // Vertical offset used to hide the status bubble as the pointer nears it.
|
| + int y_offset_;
|
| +
|
| + // If the download shelf is visible, do not obscure it.
|
| + bool download_shelf_is_visible_;
|
| };
|
|
|
| #endif // CHROME_BROWSER_GTK_STATUS_BUBBLE_GTK_H_
|
|
|