diff options
author | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-29 21:17:36 +0000 |
---|---|---|
committer | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-29 21:17:36 +0000 |
commit | f3089a667ef63143572a19a0ade9644d38cd3757 (patch) | |
tree | 7b41855722bf3d2459c5e7647fcca3b35f13540c /chrome/browser/gtk/tab_contents_container_gtk.h | |
parent | b4d31364cc189369cff90e95167bfff5f94dbcaf (diff) | |
download | chromium_src-f3089a667ef63143572a19a0ade9644d38cd3757.zip chromium_src-f3089a667ef63143572a19a0ade9644d38cd3757.tar.gz chromium_src-f3089a667ef63143572a19a0ade9644d38cd3757.tar.bz2 |
Linux findbar improvements:
* clean up toolbar/infobar/findbar borders
* move findbar to BrowserWindowGtk's vbox (so it stacks on top of infobar, as on windows)
* properly show findbar when switching between tabs
Review URL: http://codereview.chromium.org/99166
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14885 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/gtk/tab_contents_container_gtk.h')
-rw-r--r-- | chrome/browser/gtk/tab_contents_container_gtk.h | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/chrome/browser/gtk/tab_contents_container_gtk.h b/chrome/browser/gtk/tab_contents_container_gtk.h index bb914d0..d57adae 100644 --- a/chrome/browser/gtk/tab_contents_container_gtk.h +++ b/chrome/browser/gtk/tab_contents_container_gtk.h @@ -10,6 +10,7 @@ #include "base/basictypes.h" #include "chrome/common/notification_observer.h" +class FindBarGtk; class RenderViewHost; class TabContents; @@ -21,9 +22,6 @@ class TabContentsContainerGtk : public NotificationObserver { // Inserts our GtkWidget* hierarchy into a GtkBox managed by our owner. void AddContainerToBox(GtkWidget* widget); - // Add the findbar to the top of the tab contents container. - void AddFindBar(GtkWidget* widget); - // Make the specified tab visible. void SetTabContents(TabContents* tab_contents); TabContents* GetTabContents() const { return tab_contents_; } @@ -33,6 +31,8 @@ class TabContentsContainerGtk : public NotificationObserver { const NotificationSource& source, const NotificationDetails& details); + void set_find_bar(FindBarGtk* findbar) { findbar_ = findbar; } + private: // Add or remove observers for events that we care about. void AddObservers(); @@ -48,11 +48,6 @@ class TabContentsContainerGtk : public NotificationObserver { // get notified. void TabContentsDestroyed(TabContents* contents); - // Called when |fixed_| changes sizes. Used to position the findbar. - static void OnSizeAllocate(GtkWidget* fixed, - GtkAllocation* allocation, - TabContentsContainerGtk* contents_container); - // The currently visible TabContents. TabContents* tab_contents_; @@ -61,11 +56,9 @@ class TabContentsContainerGtk : public NotificationObserver { // vbox_. GtkWidget* vbox_; - // This GtkFixed widget helps us position the find bar. - GtkWidget* fixed_; - - // The findbar widget. We do not own it. - GtkWidget* findbar_; + // We have to make sure we are always underneath the findbar, hence this + // pointer. + FindBarGtk* findbar_; DISALLOW_COPY_AND_ASSIGN(TabContentsContainerGtk); }; |