OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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_TABLE_VIEW_H_ | 5 #ifndef CHROME_BROWSER_VIEWS_BOOKMARK_TABLE_VIEW_H_ |
6 #define CHROME_BROWSER_VIEWS_BOOKMARK_TABLE_VIEW_H_ | 6 #define CHROME_BROWSER_VIEWS_BOOKMARK_TABLE_VIEW_H_ |
7 | 7 |
8 #include "chrome/browser/bookmarks/bookmark_drag_data.h" | 8 #include "chrome/browser/bookmarks/bookmark_drag_data.h" |
9 #include "chrome/browser/bookmarks/bookmark_drop_info.h" | 9 #include "chrome/browser/bookmarks/bookmark_drop_info.h" |
10 #include "chrome/views/controls/menu/menu.h" | 10 #include "chrome/views/controls/menu/menu.h" |
11 #include "chrome/views/controls/table/table_view.h" | 11 #include "chrome/views/controls/table/table_view.h" |
12 | 12 |
13 class BookmarkModel; | 13 class BookmarkModel; |
14 class BookmarkNode; | 14 class BookmarkNode; |
15 class BookmarkTableModel; | 15 class BookmarkTableModel; |
16 class ChromeFont; | 16 class ChromeFont; |
17 class OSExchangeData; | 17 class OSExchangeData; |
18 class PrefService; | 18 class PrefService; |
19 class Profile; | 19 class Profile; |
20 | 20 |
21 // A TableView implementation that shows a BookmarkTableModel. | 21 // A TableView implementation that shows a BookmarkTableModel. |
22 // BookmarkTableView provides drag and drop support as well as showing a | 22 // BookmarkTableView provides drag and drop support as well as showing a |
23 // separate set of columns when showing search results. | 23 // separate set of columns when showing search results. |
24 class BookmarkTableView : public views::TableView { | 24 class BookmarkTableView : public views::TableView { |
25 public: | 25 public: |
26 BookmarkTableView(Profile* profile, BookmarkTableModel* model); | 26 BookmarkTableView(Profile* profile, BookmarkTableModel* model); |
27 | 27 |
28 static void RegisterUserPrefs(PrefService* prefs); | |
29 | |
30 // Drag and drop methods. | 28 // Drag and drop methods. |
31 virtual bool CanDrop(const OSExchangeData& data); | 29 virtual bool CanDrop(const OSExchangeData& data); |
32 virtual void OnDragEntered(const views::DropTargetEvent& event); | 30 virtual void OnDragEntered(const views::DropTargetEvent& event); |
33 virtual int OnDragUpdated(const views::DropTargetEvent& event); | 31 virtual int OnDragUpdated(const views::DropTargetEvent& event); |
34 virtual void OnDragExited(); | 32 virtual void OnDragExited(); |
35 virtual int OnPerformDrop(const views::DropTargetEvent& event); | 33 virtual int OnPerformDrop(const views::DropTargetEvent& event); |
36 | 34 |
37 // Sets the parent of the nodes being displayed. For search and recently | 35 // Sets the parent of the nodes being displayed. For search and recently |
38 // found results |parent| is NULL. | 36 // found results |parent| is NULL. |
39 void set_parent_node(BookmarkNode* parent) { parent_node_ = parent; } | 37 void set_parent_node(BookmarkNode* parent) { parent_node_ = parent; } |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 scoped_ptr<DropInfo> drop_info_; | 153 scoped_ptr<DropInfo> drop_info_; |
156 | 154 |
157 bool show_path_column_; | 155 bool show_path_column_; |
158 | 156 |
159 std::wstring alt_text_; | 157 std::wstring alt_text_; |
160 | 158 |
161 DISALLOW_COPY_AND_ASSIGN(BookmarkTableView); | 159 DISALLOW_COPY_AND_ASSIGN(BookmarkTableView); |
162 }; | 160 }; |
163 | 161 |
164 #endif // CHROME_BROWSER_VIEWS_BOOKMARK_TABLE_VIEW_H_ | 162 #endif // CHROME_BROWSER_VIEWS_BOOKMARK_TABLE_VIEW_H_ |
OLD | NEW |