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-03 19:16:59 +0000
committerdeanm@chromium.org <deanm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-03 19:16:59 +0000
commita1e071118b7ed757f2c975a8fe188fdbe80fcdd1 (patch)
treebbceb7d5265f89f5f9598658860ca775e0bdded6 /chrome/browser/gtk/bookmark_bubble_gtk.h
parent85408b7c5c652979acaf6e39d750b7e0aac579eb (diff)
downloadchromium_src-a1e071118b7ed757f2c975a8fe188fdbe80fcdd1.zip
chromium_src-a1e071118b7ed757f2c975a8fe188fdbe80fcdd1.tar.gz
chromium_src-a1e071118b7ed757f2c975a8fe188fdbe80fcdd1.tar.bz2
Implement more of the BookmarkBubble, connecting it to the bookmark system.
This allows you to edit the bookmark title, and remove the bookmark. BUG=11738 TEST=Click the bookmark star, you should be able to edit the bookmark title and remove the bookmark. Review URL: http://codereview.chromium.org/119079 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17514 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/gtk/bookmark_bubble_gtk.h')
-rw-r--r--chrome/browser/gtk/bookmark_bubble_gtk.h44
1 files changed, 40 insertions, 4 deletions
diff --git a/chrome/browser/gtk/bookmark_bubble_gtk.h b/chrome/browser/gtk/bookmark_bubble_gtk.h
index 5192413..3dd0291 100644
--- a/chrome/browser/gtk/bookmark_bubble_gtk.h
+++ b/chrome/browser/gtk/bookmark_bubble_gtk.h
@@ -53,20 +53,56 @@ class BookmarkBubbleGtk : public InfoBubbleGtkDelegate {
}
// Notified when |content_| is destroyed so we can delete our instance.
gboolean HandleDestroy();
-
+
+ static void HandleNameActivateThunk(GtkWidget* widget,
+ gpointer user_data) {
+ return reinterpret_cast<BookmarkBubbleGtk*>(user_data)->
+ HandleNameActivate();
+ }
+ void HandleNameActivate();
+
+ static void HandleCloseButtonThunk(GtkWidget* widget,
+ gpointer user_data) {
+ return reinterpret_cast<BookmarkBubbleGtk*>(user_data)->
+ HandleCloseButton();
+ }
+ void HandleCloseButton();
+
+ static void HandleRemoveButtonThunk(GtkWidget* widget,
+ gpointer user_data) {
+ return reinterpret_cast<BookmarkBubbleGtk*>(user_data)->
+ HandleRemoveButton();
+ }
+ void HandleRemoveButton();
+
+ // Update the bookmark with any edits that have been made.
+ void ApplyEdits();
+
+ // Return the UTF8 encoded title for the current |url_|.
+ std::string GetTitle();
+
// The URL of the bookmark.
GURL url_;
// Our current profile (used to access the bookmark system).
Profile* profile_;
- // Whether the bubble is creating or editing an existing bookmark.
- bool newly_bookmarked_;
// We let the InfoBubble own our content, and then we delete ourself
// when the widget is destroyed (when the InfoBubble is destroyed).
GtkWidget* content_;
+ // The GtkEntry for editing the bookmark name / title.
+ GtkWidget* name_entry_;
+
// The combo box for selecting the bookmark folder.
- GtkWidget* combo_;
+ GtkWidget* folder_combo_;
+
+ InfoBubbleGtk* bubble_;
+
+ // 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.
+ bool apply_edits_;
+ bool remove_bookmark_;
DISALLOW_COPY_AND_ASSIGN(BookmarkBubbleGtk);
};