summaryrefslogtreecommitdiffstats
path: root/chrome/browser/gtk/bookmark_bubble_gtk.h
diff options
context:
space:
mode:
authordeanm@chromium.org <deanm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-11 10:09:05 +0000
committerdeanm@chromium.org <deanm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-11 10:09:05 +0000
commitd992e7610c3f05f0042250b1180165075ebf2f44 (patch)
treeb72d88e83dad4e07a5e909aa3a70f35dd3d0f1a4 /chrome/browser/gtk/bookmark_bubble_gtk.h
parent386c889899593445683c2013ba3894f310995a91 (diff)
downloadchromium_src-d992e7610c3f05f0042250b1180165075ebf2f44.zip
chromium_src-d992e7610c3f05f0042250b1180165075ebf2f44.tar.gz
chromium_src-d992e7610c3f05f0042250b1180165075ebf2f44.tar.bz2
Final touches on the Linux BookmarkBubble.
- Implement "close on escape" with a top level accelerator. - Fix an invalid read when opening the editor from the folder combo. - Clean up some signal handlers (returning bool from a void function, etc). BUG=11738 Review URL: http://codereview.chromium.org/118493 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18154 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/gtk/bookmark_bubble_gtk.h')
-rw-r--r--chrome/browser/gtk/bookmark_bubble_gtk.h23
1 files changed, 14 insertions, 9 deletions
diff --git a/chrome/browser/gtk/bookmark_bubble_gtk.h b/chrome/browser/gtk/bookmark_bubble_gtk.h
index dcce212..8e67f6c 100644
--- a/chrome/browser/gtk/bookmark_bubble_gtk.h
+++ b/chrome/browser/gtk/bookmark_bubble_gtk.h
@@ -17,6 +17,7 @@
#include <vector>
#include "base/basictypes.h"
+#include "base/task.h"
#include "chrome/browser/gtk/info_bubble_gtk.h"
#include "googleurl/src/gurl.h"
@@ -49,45 +50,45 @@ class BookmarkBubbleGtk : public InfoBubbleGtkDelegate {
bool newly_bookmarked);
~BookmarkBubbleGtk();
- static gboolean HandleDestroyThunk(GtkWidget* widget,
- gpointer userdata) {
- return reinterpret_cast<BookmarkBubbleGtk*>(userdata)->
+ static void HandleDestroyThunk(GtkWidget* widget,
+ gpointer userdata) {
+ reinterpret_cast<BookmarkBubbleGtk*>(userdata)->
HandleDestroy();
}
// Notified when |content_| is destroyed so we can delete our instance.
- gboolean HandleDestroy();
+ void HandleDestroy();
static void HandleNameActivateThunk(GtkWidget* widget,
gpointer user_data) {
- return reinterpret_cast<BookmarkBubbleGtk*>(user_data)->
+ reinterpret_cast<BookmarkBubbleGtk*>(user_data)->
HandleNameActivate();
}
void HandleNameActivate();
static void HandleFolderChangedThunk(GtkWidget* widget,
gpointer user_data) {
- return reinterpret_cast<BookmarkBubbleGtk*>(user_data)->
+ reinterpret_cast<BookmarkBubbleGtk*>(user_data)->
HandleFolderChanged();
}
void HandleFolderChanged();
static void HandleEditButtonThunk(GtkWidget* widget,
gpointer user_data) {
- return reinterpret_cast<BookmarkBubbleGtk*>(user_data)->
+ reinterpret_cast<BookmarkBubbleGtk*>(user_data)->
HandleEditButton();
}
void HandleEditButton();
static void HandleCloseButtonThunk(GtkWidget* widget,
gpointer user_data) {
- return reinterpret_cast<BookmarkBubbleGtk*>(user_data)->
+ reinterpret_cast<BookmarkBubbleGtk*>(user_data)->
HandleCloseButton();
}
void HandleCloseButton();
static void HandleRemoveButtonThunk(GtkWidget* widget,
gpointer user_data) {
- return reinterpret_cast<BookmarkBubbleGtk*>(user_data)->
+ reinterpret_cast<BookmarkBubbleGtk*>(user_data)->
HandleRemoveButton();
}
void HandleRemoveButton();
@@ -124,6 +125,10 @@ class BookmarkBubbleGtk : public InfoBubbleGtkDelegate {
InfoBubbleGtk* bubble_;
+ // We need to push some things on the back of the message loop, so we have
+ // a factory attached to our instance to manage task lifetimes.
+ ScopedRunnableMethodFactory<BookmarkBubbleGtk> factory_;
+
// Whether the bubble is creating or editing an existing bookmark.
bool newly_bookmarked_;
// When closing the window, whether we should update or remove the bookmark.