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 28 matching lines...) Expand all Loading... |
39 // Shows the bookmark bubble, pointing at |anchor_widget|. | 39 // Shows the bookmark bubble, pointing at |anchor_widget|. |
40 static void Show(GtkWidget* anchor_widget, | 40 static void Show(GtkWidget* anchor_widget, |
41 Profile* profile, | 41 Profile* profile, |
42 const GURL& url, | 42 const GURL& url, |
43 bool newly_bookmarked); | 43 bool newly_bookmarked); |
44 | 44 |
45 // BubbleDelegateGtk: | 45 // BubbleDelegateGtk: |
46 virtual void BubbleClosing(BubbleGtk* bubble, bool closed_by_escape) OVERRIDE; | 46 virtual void BubbleClosing(BubbleGtk* bubble, bool closed_by_escape) OVERRIDE; |
47 | 47 |
48 // NotificationObserver: | 48 // NotificationObserver: |
49 virtual void Observe(NotificationType type, | 49 virtual void Observe(int 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 virtual ~BookmarkBubbleGtk(); | 58 virtual ~BookmarkBubbleGtk(); |
59 | 59 |
(...skipping 58 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 |