| 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/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 bool blocked_visit; | 85 bool blocked_visit; |
| 86 | 86 |
| 87 // kAcceptLanguages pref value. | 87 // kAcceptLanguages pref value. |
| 88 std::string accept_languages; | 88 std::string accept_languages; |
| 89 }; | 89 }; |
| 90 | 90 |
| 91 BrowsingHistoryHandler(); | 91 BrowsingHistoryHandler(); |
| 92 virtual ~BrowsingHistoryHandler(); | 92 virtual ~BrowsingHistoryHandler(); |
| 93 | 93 |
| 94 // WebUIMessageHandler implementation. | 94 // WebUIMessageHandler implementation. |
| 95 virtual void RegisterMessages() OVERRIDE; | 95 virtual void RegisterMessages() override; |
| 96 | 96 |
| 97 // Handler for the "queryHistory" message. | 97 // Handler for the "queryHistory" message. |
| 98 void HandleQueryHistory(const base::ListValue* args); | 98 void HandleQueryHistory(const base::ListValue* args); |
| 99 | 99 |
| 100 // Handler for the "removeVisits" message. | 100 // Handler for the "removeVisits" message. |
| 101 void HandleRemoveVisits(const base::ListValue* args); | 101 void HandleRemoveVisits(const base::ListValue* args); |
| 102 | 102 |
| 103 // Handler for "clearBrowsingData" message. | 103 // Handler for "clearBrowsingData" message. |
| 104 void HandleClearBrowsingData(const base::ListValue* args); | 104 void HandleClearBrowsingData(const base::ListValue* args); |
| 105 | 105 |
| 106 // Handler for "removeBookmark" message. | 106 // Handler for "removeBookmark" message. |
| 107 void HandleRemoveBookmark(const base::ListValue* args); | 107 void HandleRemoveBookmark(const base::ListValue* args); |
| 108 | 108 |
| 109 // content::NotificationObserver implementation. | 109 // content::NotificationObserver implementation. |
| 110 virtual void Observe(int type, | 110 virtual void Observe(int type, |
| 111 const content::NotificationSource& source, | 111 const content::NotificationSource& source, |
| 112 const content::NotificationDetails& details) OVERRIDE; | 112 const content::NotificationDetails& details) override; |
| 113 | 113 |
| 114 // Merges duplicate entries from the query results, only retaining the most | 114 // Merges duplicate entries from the query results, only retaining the most |
| 115 // recent visit to a URL on a particular day. That visit contains the | 115 // recent visit to a URL on a particular day. That visit contains the |
| 116 // timestamps of the other visits. | 116 // timestamps of the other visits. |
| 117 static void MergeDuplicateResults( | 117 static void MergeDuplicateResults( |
| 118 std::vector<BrowsingHistoryHandler::HistoryEntry>* results); | 118 std::vector<BrowsingHistoryHandler::HistoryEntry>* results); |
| 119 | 119 |
| 120 private: | 120 private: |
| 121 // The range for which to return results: | 121 // The range for which to return results: |
| 122 // - ALLTIME: allows access to all the results in a paginated way. | 122 // - ALLTIME: allows access to all the results in a paginated way. |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 210 explicit HistoryUI(content::WebUI* web_ui); | 210 explicit HistoryUI(content::WebUI* web_ui); |
| 211 | 211 |
| 212 static base::RefCountedMemory* GetFaviconResourceBytes( | 212 static base::RefCountedMemory* GetFaviconResourceBytes( |
| 213 ui::ScaleFactor scale_factor); | 213 ui::ScaleFactor scale_factor); |
| 214 | 214 |
| 215 private: | 215 private: |
| 216 DISALLOW_COPY_AND_ASSIGN(HistoryUI); | 216 DISALLOW_COPY_AND_ASSIGN(HistoryUI); |
| 217 }; | 217 }; |
| 218 | 218 |
| 219 #endif // CHROME_BROWSER_UI_WEBUI_HISTORY_UI_H_ | 219 #endif // CHROME_BROWSER_UI_WEBUI_HISTORY_UI_H_ |
| OLD | NEW |