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

Unified Diff: chrome/browser/gtk/bookmark_bar_gtk.h

Issue 329022: GTK: Draw floating bookmark bar correctly during resizes.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 2 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 | « no previous file | chrome/browser/gtk/bookmark_bar_gtk.cc » ('j') | chrome/browser/gtk/bookmark_bar_gtk.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/gtk/bookmark_bar_gtk.h
===================================================================
--- chrome/browser/gtk/bookmark_bar_gtk.h (revision 30061)
+++ chrome/browser/gtk/bookmark_bar_gtk.h (working copy)
@@ -11,6 +11,7 @@
#include <vector>
#include "app/slide_animation.h"
+#include "base/gfx/size.h"
#include "base/scoped_ptr.h"
#include "chrome/browser/bookmarks/bookmark_model_observer.h"
#include "chrome/browser/gtk/menu_bar_helper.h"
@@ -150,6 +151,13 @@
// state.
void UpdateEventBoxPaintability();
+ // Queue a paint on the event box.
+ void PaintEventBox();
+
+ // Finds the size of the current tab contents. If the size cannot be found,
+ // DCHECKs and returns false. Otherwise, sets |size| to the correct value.
+ bool GetTabContentsSize(gfx::Size* size);
+
// Overridden from BookmarkModelObserver:
// Invoked when the bookmark model has finished loading. Creates a button
@@ -245,12 +253,17 @@
// GtkEventBox callbacks.
static gboolean OnEventBoxExpose(GtkWidget* widget, GdkEventExpose* event,
- BookmarkBarGtk* window);
+ BookmarkBarGtk* bar);
// GtkVSeparator callbacks.
static gboolean OnSeparatorExpose(GtkWidget* widget, GdkEventExpose* event,
BookmarkBarGtk* window);
tony 2009/10/26 23:55:30 Nit: want to change this to |bar| as well?
+ // Callbacks on our parent widget.
+ static void OnParentSizeAllocate(GtkWidget* widget,
+ GtkAllocation* allocation,
+ BookmarkBarGtk* bar);
+
#if defined(BROWSER_SYNC)
// ProfileSyncServiceObserver method.
virtual void OnStateChanged();
@@ -351,6 +364,13 @@
int last_allocation_width_;
NotificationRegistrar registrar_;
+
+ // The size of the tab contents last time we forced a paint. We keep track
+ // of this so we don't force too many paints.
+ gfx::Size last_tab_contents_size_;
+
+ // We post delayed paints using this factory.
+ ScopedRunnableMethodFactory<BookmarkBarGtk> event_box_paint_factory_;
};
#endif // CHROME_BROWSER_GTK_BOOKMARK_BAR_GTK_H_
« no previous file with comments | « no previous file | chrome/browser/gtk/bookmark_bar_gtk.cc » ('j') | chrome/browser/gtk/bookmark_bar_gtk.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698