OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_BROWSING_HISTORY_HANDLER_H_ |
6 #define CHROME_BROWSER_UI_WEBUI_HISTORY_UI_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_BROWSING_HISTORY_HANDLER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/macros.h" | |
10 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
11 #include "base/memory/weak_ptr.h" | 12 #include "base/memory/weak_ptr.h" |
12 #include "base/scoped_observer.h" | 13 #include "base/scoped_observer.h" |
13 #include "base/strings/string16.h" | 14 #include "base/strings/string16.h" |
14 #include "base/task/cancelable_task_tracker.h" | 15 #include "base/task/cancelable_task_tracker.h" |
15 #include "base/timer/timer.h" | 16 #include "base/timer/timer.h" |
16 #include "base/values.h" | 17 #include "base/values.h" |
17 #include "components/history/core/browser/history_service_observer.h" | 18 #include "components/history/core/browser/history_service_observer.h" |
19 #include "components/history/core/browser/url_row.h" | |
18 #include "components/history/core/browser/web_history_service.h" | 20 #include "components/history/core/browser/web_history_service.h" |
19 #include "content/public/browser/web_ui_controller.h" | |
20 #include "content/public/browser/web_ui_message_handler.h" | 21 #include "content/public/browser/web_ui_message_handler.h" |
21 #include "ui/base/layout.h" | 22 #include "url/gurl.h" |
22 | 23 |
23 class ProfileSyncService; | 24 class ProfileSyncService; |
24 class SupervisedUserService; | 25 class SupervisedUserService; |
25 | 26 |
26 namespace bookmarks { | 27 namespace bookmarks { |
27 class BookmarkModel; | 28 class BookmarkModel; |
28 } | 29 } |
29 | 30 |
30 namespace history { | 31 namespace history { |
31 class HistoryService; | 32 class HistoryService; |
33 class QueryResults; | |
34 struct QueryOptions; | |
Dan Beam
2015/11/20 20:13:00
nit: alphabetize by type name
tsergeant
2015/11/22 23:45:18
Done.
| |
32 } | 35 } |
33 | 36 |
34 // The handler for Javascript messages related to the "history" view. | 37 // The handler for Javascript messages related to the "history" view. |
35 class BrowsingHistoryHandler : public content::WebUIMessageHandler, | 38 class BrowsingHistoryHandler : public content::WebUIMessageHandler, |
36 public history::HistoryServiceObserver { | 39 public history::HistoryServiceObserver { |
37 public: | 40 public: |
38 // Represents a history entry to be shown to the user, representing either | 41 // Represents a history entry to be shown to the user, representing either |
39 // a local or remote visit. A single entry can represent multiple visits, | 42 // a local or remote visit. A single entry can represent multiple visits, |
40 // since only the most recent visit on a particular day is shown. | 43 // since only the most recent visit on a particular day is shown. |
41 struct HistoryEntry { | 44 struct HistoryEntry { |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
210 base::OneShotTimer web_history_timer_; | 213 base::OneShotTimer web_history_timer_; |
211 | 214 |
212 ScopedObserver<history::HistoryService, history::HistoryServiceObserver> | 215 ScopedObserver<history::HistoryService, history::HistoryServiceObserver> |
213 history_service_observer_; | 216 history_service_observer_; |
214 | 217 |
215 base::WeakPtrFactory<BrowsingHistoryHandler> weak_factory_; | 218 base::WeakPtrFactory<BrowsingHistoryHandler> weak_factory_; |
216 | 219 |
217 DISALLOW_COPY_AND_ASSIGN(BrowsingHistoryHandler); | 220 DISALLOW_COPY_AND_ASSIGN(BrowsingHistoryHandler); |
218 }; | 221 }; |
219 | 222 |
220 class HistoryUI : public content::WebUIController { | 223 #endif // CHROME_BROWSER_UI_WEBUI_BROWSING_HISTORY_HANDLER_H_ |
221 public: | |
222 explicit HistoryUI(content::WebUI* web_ui); | |
223 ~HistoryUI() override; | |
224 | |
225 static base::RefCountedMemory* GetFaviconResourceBytes( | |
226 ui::ScaleFactor scale_factor); | |
227 | |
228 private: | |
229 DISALLOW_COPY_AND_ASSIGN(HistoryUI); | |
230 }; | |
231 | |
232 #endif // CHROME_BROWSER_UI_WEBUI_HISTORY_UI_H_ | |
OLD | NEW |