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. |
11 | 11 |
12 #ifndef CHROME_BROWSER_UI_GTK_BOOKMARKS_BOOKMARK_BUBBLE_GTK_H_ | 12 #ifndef CHROME_BROWSER_UI_GTK_BOOKMARKS_BOOKMARK_BUBBLE_GTK_H_ |
13 #define CHROME_BROWSER_UI_GTK_BOOKMARKS_BOOKMARK_BUBBLE_GTK_H_ | 13 #define CHROME_BROWSER_UI_GTK_BOOKMARKS_BOOKMARK_BUBBLE_GTK_H_ |
14 #pragma once | 14 #pragma once |
15 | 15 |
16 #include <string> | 16 #include <string> |
17 #include <vector> | 17 #include <vector> |
18 | 18 |
19 #include "base/basictypes.h" | 19 #include "base/basictypes.h" |
20 #include "base/compiler_specific.h" | 20 #include "base/compiler_specific.h" |
21 #include "base/memory/scoped_ptr.h" | 21 #include "base/memory/scoped_ptr.h" |
22 #include "base/memory/weak_ptr.h" | 22 #include "base/memory/weak_ptr.h" |
23 #include "base/task.h" | 23 #include "base/task.h" |
24 #include "chrome/browser/ui/gtk/bubble/bubble_gtk.h" | 24 #include "chrome/browser/ui/gtk/bubble/bubble_gtk.h" |
25 #include "content/public/browser/notification_observer.h" | 25 #include "content/public/browser/notification_observer.h" |
26 #include "content/public/browser/notification_registrar.h" | 26 #include "content/public/browser/notification_registrar.h" |
27 #include "googleurl/src/gurl.h" | 27 #include "googleurl/src/gurl.h" |
28 #include "ui/base/gtk/gtk_signal.h" | 28 #include "ui/base/gtk/gtk_signal.h" |
29 | 29 |
30 class BookmarkNode; | |
31 class Profile; | 30 class Profile; |
32 class RecentlyUsedFoldersComboModel; | 31 class RecentlyUsedFoldersComboModel; |
33 | 32 |
34 typedef struct _GtkWidget GtkWidget; | 33 typedef struct _GtkWidget GtkWidget; |
35 typedef struct _GParamSpec GParamSpec; | 34 typedef struct _GParamSpec GParamSpec; |
36 | 35 |
37 class BookmarkBubbleGtk : public BubbleDelegateGtk, | 36 class BookmarkBubbleGtk : public BubbleDelegateGtk, |
38 public content::NotificationObserver { | 37 public content::NotificationObserver { |
39 public: | 38 public: |
40 // Shows the bookmark bubble, pointing at |anchor_widget|. | 39 // Shows the bookmark bubble, pointing at |anchor_widget|. |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 // 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. |
120 bool apply_edits_; | 119 bool apply_edits_; |
121 bool remove_bookmark_; | 120 bool remove_bookmark_; |
122 | 121 |
123 content::NotificationRegistrar registrar_; | 122 content::NotificationRegistrar registrar_; |
124 | 123 |
125 DISALLOW_COPY_AND_ASSIGN(BookmarkBubbleGtk); | 124 DISALLOW_COPY_AND_ASSIGN(BookmarkBubbleGtk); |
126 }; | 125 }; |
127 | 126 |
128 #endif // CHROME_BROWSER_UI_GTK_BOOKMARKS_BOOKMARK_BUBBLE_GTK_H_ | 127 #endif // CHROME_BROWSER_UI_GTK_BOOKMARKS_BOOKMARK_BUBBLE_GTK_H_ |
OLD | NEW |