| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // This is the GTK implementation of the bookmark bubble, the dialog box | 5 // This is the GTK implementation of the bookmark bubble, the dialog box |
| 6 // presented to create or edit a bookmark. There can only ever be a single | 6 // presented to create or edit a bookmark. There can only ever be a single |
| 7 // bubble open, so the class presents only static methods, and handles the | 7 // bubble open, so the class presents only static methods, and handles the |
| 8 // singleton behavior for you. It also handles the object and widget | 8 // singleton behavior for you. It also handles the object and widget |
| 9 // lifetimes, destroying everything and possibly committing any changes when | 9 // lifetimes, destroying everything and possibly committing any changes when |
| 10 // the bubble is closed. | 10 // the bubble is closed. |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 BookmarkBubbleGtk(GtkWidget* anchor, | 53 BookmarkBubbleGtk(GtkWidget* anchor, |
| 54 Profile* profile, | 54 Profile* profile, |
| 55 const GURL& url, | 55 const GURL& url, |
| 56 bool newly_bookmarked); | 56 bool newly_bookmarked); |
| 57 virtual ~BookmarkBubbleGtk(); | 57 virtual ~BookmarkBubbleGtk(); |
| 58 | 58 |
| 59 // Notified when |content_| is destroyed so we can delete our instance. | 59 // Notified when |content_| is destroyed so we can delete our instance. |
| 60 CHROMEGTK_CALLBACK_0(BookmarkBubbleGtk, void, OnDestroy); | 60 CHROMEGTK_CALLBACK_0(BookmarkBubbleGtk, void, OnDestroy); |
| 61 CHROMEGTK_CALLBACK_0(BookmarkBubbleGtk, void, OnNameActivate); | 61 CHROMEGTK_CALLBACK_0(BookmarkBubbleGtk, void, OnNameActivate); |
| 62 CHROMEGTK_CALLBACK_0(BookmarkBubbleGtk, void, OnFolderChanged); | 62 CHROMEGTK_CALLBACK_0(BookmarkBubbleGtk, void, OnFolderChanged); |
| 63 CHROMEGTK_CALLBACK_1(BookmarkBubbleGtk, void, OnFolderPopupShown, | |
| 64 GParamSpec*); | |
| 65 CHROMEGTK_CALLBACK_0(BookmarkBubbleGtk, void, OnEditClicked); | 63 CHROMEGTK_CALLBACK_0(BookmarkBubbleGtk, void, OnEditClicked); |
| 66 CHROMEGTK_CALLBACK_0(BookmarkBubbleGtk, void, OnCloseClicked); | 64 CHROMEGTK_CALLBACK_0(BookmarkBubbleGtk, void, OnCloseClicked); |
| 67 CHROMEGTK_CALLBACK_0(BookmarkBubbleGtk, void, OnRemoveClicked); | 65 CHROMEGTK_CALLBACK_0(BookmarkBubbleGtk, void, OnRemoveClicked); |
| 68 | 66 |
| 69 // Update the bookmark with any edits that have been made. | 67 // Update the bookmark with any edits that have been made. |
| 70 void ApplyEdits(); | 68 void ApplyEdits(); |
| 71 | 69 |
| 72 // Open the bookmark editor for the current url and close the bubble. | 70 // Open the bookmark editor for the current url and close the bubble. |
| 73 void ShowEditor(); | 71 void ShowEditor(); |
| 74 | 72 |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 // When closing the window, whether we should update or remove the bookmark. | 119 // When closing the window, whether we should update or remove the bookmark. |
| 122 bool apply_edits_; | 120 bool apply_edits_; |
| 123 bool remove_bookmark_; | 121 bool remove_bookmark_; |
| 124 | 122 |
| 125 content::NotificationRegistrar registrar_; | 123 content::NotificationRegistrar registrar_; |
| 126 | 124 |
| 127 DISALLOW_COPY_AND_ASSIGN(BookmarkBubbleGtk); | 125 DISALLOW_COPY_AND_ASSIGN(BookmarkBubbleGtk); |
| 128 }; | 126 }; |
| 129 | 127 |
| 130 #endif // CHROME_BROWSER_UI_GTK_BOOKMARKS_BOOKMARK_BUBBLE_GTK_H_ | 128 #endif // CHROME_BROWSER_UI_GTK_BOOKMARKS_BOOKMARK_BUBBLE_GTK_H_ |
| OLD | NEW |