OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 #ifndef CHROME_BROWSER_VIEWS_BOOKMARK_MANAGER_VIEW_H_ | 5 #ifndef CHROME_BROWSER_VIEWS_BOOKMARK_MANAGER_VIEW_H_ |
6 #define CHROME_BROWSER_VIEWS_BOOKMARK_MANAGER_VIEW_H_ | 6 #define CHROME_BROWSER_VIEWS_BOOKMARK_MANAGER_VIEW_H_ |
7 | 7 |
8 #include "base/ref_counted.h" | 8 #include "base/ref_counted.h" |
9 #include "base/task.h" | 9 #include "base/task.h" |
10 #include "chrome/browser/bookmarks/bookmark_context_menu.h" | 10 #include "chrome/browser/bookmarks/bookmark_context_menu.h" |
11 #include "chrome/browser/bookmarks/bookmark_model.h" | 11 #include "chrome/browser/bookmarks/bookmark_model.h" |
12 #include "chrome/browser/shell_dialogs.h" | 12 #include "chrome/browser/shell_dialogs.h" |
13 #include "views/controls/menu/view_menu_delegate.h" | 13 #include "views/controls/menu/view_menu_delegate.h" |
14 #include "views/controls/table/table_view_observer.h" | 14 #include "views/controls/table/table_view_observer.h" |
15 #include "views/controls/textfield/textfield.h" | 15 #include "views/controls/textfield/textfield.h" |
16 #include "views/controls/tree/tree_view.h" | 16 #include "views/controls/tree/tree_view.h" |
17 #include "views/view.h" | 17 #include "views/view.h" |
18 #include "views/window/window_delegate.h" | 18 #include "views/window/window_delegate.h" |
19 #include "webkit/glue/window_open_disposition.h" | 19 #include "webkit/glue/window_open_disposition.h" |
20 | 20 |
21 class BookmarkFolderTreeModel; | 21 class BookmarkFolderTreeModel; |
22 class BookmarkFolderTreeView; | 22 class BookmarkFolderTreeView; |
23 class BookmarkTableModel; | 23 class BookmarkTableModel; |
24 class BookmarkTableView; | 24 class BookmarkTableView; |
25 class PrefService; | |
26 class Profile; | 25 class Profile; |
27 | 26 |
28 namespace views { | 27 namespace views { |
29 class SingleSplitView; | 28 class SingleSplitView; |
30 } | 29 } |
31 // A view that lets the user manage their bookmarks. The bookmark manager | 30 // A view that lets the user manage their bookmarks. The bookmark manager |
32 // shows a tree on the left with a table on the right. The tree shows the | 31 // shows a tree on the left with a table on the right. The tree shows the |
33 // folder nodes and the table the contents of the selected tree node. The | 32 // folder nodes and the table the contents of the selected tree node. The |
34 // tree is a BookmarkFolderTreeView and the table a BookmarkTableView. A | 33 // tree is a BookmarkFolderTreeView and the table a BookmarkTableView. A |
35 // text field is also provided that allows the user to search the contents | 34 // text field is also provided that allows the user to search the contents |
(...skipping 12 matching lines...) Expand all Loading... |
48 enum CutCopyPasteType { | 47 enum CutCopyPasteType { |
49 CUT, | 48 CUT, |
50 COPY, | 49 COPY, |
51 PASTE, | 50 PASTE, |
52 NONE | 51 NONE |
53 }; | 52 }; |
54 | 53 |
55 explicit BookmarkManagerView(Profile* profile); | 54 explicit BookmarkManagerView(Profile* profile); |
56 virtual ~BookmarkManagerView(); | 55 virtual ~BookmarkManagerView(); |
57 | 56 |
58 static void RegisterPrefs(PrefService* prefs); | |
59 | |
60 // Shows the bookmark manager. Only one bookmark manager exists. | 57 // Shows the bookmark manager. Only one bookmark manager exists. |
61 static void Show(Profile* profile); | 58 static void Show(Profile* profile); |
62 | 59 |
63 // Returns the current manager, or NULL if the manager is not showing. | 60 // Returns the current manager, or NULL if the manager is not showing. |
64 static BookmarkManagerView* current(); | 61 static BookmarkManagerView* current(); |
65 | 62 |
66 // Selects the specified node in the tree. If node is a URL it's parent is | 63 // Selects the specified node in the tree. If node is a URL it's parent is |
67 // selected and node is selected in the table. | 64 // selected and node is selected in the table. |
68 void SelectInTree(BookmarkNode* node); | 65 void SelectInTree(BookmarkNode* node); |
69 | 66 |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
216 // Import/export file dialog. | 213 // Import/export file dialog. |
217 scoped_refptr<SelectFileDialog> select_file_dialog_; | 214 scoped_refptr<SelectFileDialog> select_file_dialog_; |
218 | 215 |
219 // Factory used for delaying search. | 216 // Factory used for delaying search. |
220 ScopedRunnableMethodFactory<BookmarkManagerView> search_factory_; | 217 ScopedRunnableMethodFactory<BookmarkManagerView> search_factory_; |
221 | 218 |
222 DISALLOW_COPY_AND_ASSIGN(BookmarkManagerView); | 219 DISALLOW_COPY_AND_ASSIGN(BookmarkManagerView); |
223 }; | 220 }; |
224 | 221 |
225 #endif // CHROME_BROWSER_VIEWS_BOOKMARK_MANAGER_VIEW_H_ | 222 #endif // CHROME_BROWSER_VIEWS_BOOKMARK_MANAGER_VIEW_H_ |
OLD | NEW |