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

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

Issue 7063003: Make FindBar obey dialog bounds for GTK. Will fix other platforms in separate patches. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 7 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: chrome/browser/ui/gtk/find_bar_gtk.h
diff --git a/chrome/browser/ui/gtk/find_bar_gtk.h b/chrome/browser/ui/gtk/find_bar_gtk.h
index a970b91f016fbb9336af8471aa60ecb29e40a544..ce41e71f083d7bf976cddd12a39e5c0262059253 100644
--- a/chrome/browser/ui/gtk/find_bar_gtk.h
+++ b/chrome/browser/ui/gtk/find_bar_gtk.h
@@ -65,6 +65,7 @@ class FindBarGtk : public FindBar,
virtual string16 GetFindText();
virtual string16 GetFindSelectedText();
virtual string16 GetMatchCountText();
+ virtual int GetWidth();
// Overridden from NotificationObserver:
virtual void Observe(NotificationType type,
@@ -93,6 +94,9 @@ class FindBarGtk : public FindBar,
// Asynchronously repositions the dialog.
void Reposition();
+ // Returns the bounds of the dialog that contains the find bar.
+ gfx::Rect GetDialogBounds();
+
// Returns the rectangle representing where to position the find bar. If
// |avoid_overlapping_rect| is specified, the return value will be a rectangle
// located immediately to the left of |avoid_overlapping_rect|, as long as
@@ -115,6 +119,10 @@ class FindBarGtk : public FindBar,
static void OnParentSet(GtkWidget* widget, GtkObject* old_parent,
FindBarGtk* find_bar);
+ static void OnContentSizeAllocate(GtkWidget* content_hbox,
+ GtkAllocation* allocation,
+ FindBarGtk* find_bar);
+
static void OnSetFloatingPosition(GtkFloatingContainer* floating_container,
GtkAllocation* allocation,
FindBarGtk* find_bar);

Powered by Google App Engine
This is Rietveld 408576698