OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_UI_WEBUI_HISTORY_UI_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_HISTORY_UI_H_ |
6 #define CHROME_BROWSER_UI_WEBUI_HISTORY_UI_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_HISTORY_UI_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
| 11 #include "base/task/cancelable_task_tracker.h" |
11 #include "base/timer/timer.h" | 12 #include "base/timer/timer.h" |
12 #include "base/values.h" | 13 #include "base/values.h" |
13 #include "chrome/browser/common/cancelable_request.h" | 14 #include "chrome/browser/common/cancelable_request.h" |
14 #include "chrome/browser/history/history_service.h" | 15 #include "chrome/browser/history/history_service.h" |
15 #include "chrome/browser/history/web_history_service.h" | 16 #include "chrome/browser/history/web_history_service.h" |
16 #include "chrome/common/cancelable_task_tracker.h" | |
17 #include "content/public/browser/notification_registrar.h" | 17 #include "content/public/browser/notification_registrar.h" |
18 #include "content/public/browser/web_ui_controller.h" | 18 #include "content/public/browser/web_ui_controller.h" |
19 #include "content/public/browser/web_ui_message_handler.h" | 19 #include "content/public/browser/web_ui_message_handler.h" |
20 | 20 |
21 class BookmarkModel; | 21 class BookmarkModel; |
22 class ManagedUserService; | 22 class ManagedUserService; |
23 class ProfileSyncService; | 23 class ProfileSyncService; |
24 | 24 |
25 // The handler for Javascript messages related to the "history" view. | 25 // The handler for Javascript messages related to the "history" view. |
26 class BrowsingHistoryHandler : public content::WebUIMessageHandler, | 26 class BrowsingHistoryHandler : public content::WebUIMessageHandler, |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 | 179 |
180 // The currently-executing request for synced history results. | 180 // The currently-executing request for synced history results. |
181 // Deleting the request will cancel it. | 181 // Deleting the request will cancel it. |
182 scoped_ptr<history::WebHistoryService::Request> web_history_request_; | 182 scoped_ptr<history::WebHistoryService::Request> web_history_request_; |
183 | 183 |
184 // The currently-executing delete request for synced history. | 184 // The currently-executing delete request for synced history. |
185 // Deleting the request will cancel it. | 185 // Deleting the request will cancel it. |
186 scoped_ptr<history::WebHistoryService::Request> web_history_delete_request_; | 186 scoped_ptr<history::WebHistoryService::Request> web_history_delete_request_; |
187 | 187 |
188 // Tracker for delete requests to the history service. | 188 // Tracker for delete requests to the history service. |
189 CancelableTaskTracker delete_task_tracker_; | 189 base::CancelableTaskTracker delete_task_tracker_; |
190 | 190 |
191 // The list of URLs that are in the process of being deleted. | 191 // The list of URLs that are in the process of being deleted. |
192 std::set<GURL> urls_to_be_deleted_; | 192 std::set<GURL> urls_to_be_deleted_; |
193 | 193 |
194 // The info value that is returned to the front end with the query results. | 194 // The info value that is returned to the front end with the query results. |
195 base::DictionaryValue results_info_value_; | 195 base::DictionaryValue results_info_value_; |
196 | 196 |
197 // The list of query results received from the history service. | 197 // The list of query results received from the history service. |
198 std::vector<HistoryEntry> query_results_; | 198 std::vector<HistoryEntry> query_results_; |
199 | 199 |
(...skipping 14 matching lines...) Expand all Loading... |
214 static const GURL GetHistoryURLWithSearchText(const base::string16& text); | 214 static const GURL GetHistoryURLWithSearchText(const base::string16& text); |
215 | 215 |
216 static base::RefCountedMemory* GetFaviconResourceBytes( | 216 static base::RefCountedMemory* GetFaviconResourceBytes( |
217 ui::ScaleFactor scale_factor); | 217 ui::ScaleFactor scale_factor); |
218 | 218 |
219 private: | 219 private: |
220 DISALLOW_COPY_AND_ASSIGN(HistoryUI); | 220 DISALLOW_COPY_AND_ASSIGN(HistoryUI); |
221 }; | 221 }; |
222 | 222 |
223 #endif // CHROME_BROWSER_UI_WEBUI_HISTORY_UI_H_ | 223 #endif // CHROME_BROWSER_UI_WEBUI_HISTORY_UI_H_ |
OLD | NEW |