| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 // NotificationObserver: | 48 // NotificationObserver: |
| 49 virtual void Observe(NotificationType type, | 49 virtual void Observe(NotificationType type, |
| 50 const NotificationSource& source, | 50 const NotificationSource& source, |
| 51 const NotificationDetails& details) OVERRIDE; | 51 const NotificationDetails& details) OVERRIDE; |
| 52 | 52 |
| 53 private: | 53 private: |
| 54 BookmarkBubbleGtk(GtkWidget* anchor, | 54 BookmarkBubbleGtk(GtkWidget* anchor, |
| 55 Profile* profile, | 55 Profile* profile, |
| 56 const GURL& url, | 56 const GURL& url, |
| 57 bool newly_bookmarked); | 57 bool newly_bookmarked); |
| 58 ~BookmarkBubbleGtk(); | 58 virtual ~BookmarkBubbleGtk(); |
| 59 | 59 |
| 60 // Notified when |content_| is destroyed so we can delete our instance. | 60 // Notified when |content_| is destroyed so we can delete our instance. |
| 61 CHROMEGTK_CALLBACK_0(BookmarkBubbleGtk, void, OnDestroy); | 61 CHROMEGTK_CALLBACK_0(BookmarkBubbleGtk, void, OnDestroy); |
| 62 CHROMEGTK_CALLBACK_0(BookmarkBubbleGtk, void, OnNameActivate); | 62 CHROMEGTK_CALLBACK_0(BookmarkBubbleGtk, void, OnNameActivate); |
| 63 CHROMEGTK_CALLBACK_0(BookmarkBubbleGtk, void, OnFolderChanged); | 63 CHROMEGTK_CALLBACK_0(BookmarkBubbleGtk, void, OnFolderChanged); |
| 64 CHROMEGTK_CALLBACK_1(BookmarkBubbleGtk, void, OnFolderPopupShown, | 64 CHROMEGTK_CALLBACK_1(BookmarkBubbleGtk, void, OnFolderPopupShown, |
| 65 GParamSpec*); | 65 GParamSpec*); |
| 66 CHROMEGTK_CALLBACK_0(BookmarkBubbleGtk, void, OnEditClicked); | 66 CHROMEGTK_CALLBACK_0(BookmarkBubbleGtk, void, OnEditClicked); |
| 67 CHROMEGTK_CALLBACK_0(BookmarkBubbleGtk, void, OnCloseClicked); | 67 CHROMEGTK_CALLBACK_0(BookmarkBubbleGtk, void, OnCloseClicked); |
| 68 CHROMEGTK_CALLBACK_0(BookmarkBubbleGtk, void, OnRemoveClicked); | 68 CHROMEGTK_CALLBACK_0(BookmarkBubbleGtk, void, OnRemoveClicked); |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 // When closing the window, whether we should update or remove the bookmark. | 118 // When closing the window, whether we should update or remove the bookmark. |
| 119 bool apply_edits_; | 119 bool apply_edits_; |
| 120 bool remove_bookmark_; | 120 bool remove_bookmark_; |
| 121 | 121 |
| 122 NotificationRegistrar registrar_; | 122 NotificationRegistrar registrar_; |
| 123 | 123 |
| 124 DISALLOW_COPY_AND_ASSIGN(BookmarkBubbleGtk); | 124 DISALLOW_COPY_AND_ASSIGN(BookmarkBubbleGtk); |
| 125 }; | 125 }; |
| 126 | 126 |
| 127 #endif // CHROME_BROWSER_UI_GTK_BOOKMARKS_BOOKMARK_BUBBLE_GTK_H_ | 127 #endif // CHROME_BROWSER_UI_GTK_BOOKMARKS_BOOKMARK_BUBBLE_GTK_H_ |
| OLD | NEW |