OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef COMPONENTS_HISTORY_CORE_BROWSER_VISIT_DELEGATE_H_ |
| 6 #define COMPONENTS_HISTORY_CORE_BROWSER_VISIT_DELEGATE_H_ |
| 7 |
| 8 #include <vector> |
| 9 |
| 10 #include "base/macros.h" |
| 11 |
| 12 class GURL; |
| 13 class HistoryService; |
| 14 |
| 15 namespace history { |
| 16 |
| 17 // VisitDelegate gets notified about URLs recorded as visited by the |
| 18 // HistoryService. |
| 19 class VisitDelegate { |
| 20 public: |
| 21 VisitDelegate(); |
| 22 virtual ~VisitDelegate(); |
| 23 |
| 24 // Called once HistoryService initialization is complete. Returns true if the |
| 25 // initialization succeeded, false otherwise. |
| 26 virtual bool Init(HistoryService* history_service) = 0; |
| 27 |
| 28 // Called when an URL is recorded by HistoryService. |
| 29 virtual void AddURL(const GURL& url) = 0; |
| 30 |
| 31 // Called when a list of URLs are recorded by HistoryService. |
| 32 virtual void AddURLs(const std::vector<GURL>& urls) = 0; |
| 33 |
| 34 // Called when a list of URLs are removed from HistoryService. |
| 35 virtual void DeleteURLs(const std::vector<GURL>& urls) = 0; |
| 36 |
| 37 // Called when all URLs are removed from HistoryService. |
| 38 virtual void DeleteAllURLs() = 0; |
| 39 |
| 40 private: |
| 41 DISALLOW_COPY_AND_ASSIGN(VisitDelegate); |
| 42 }; |
| 43 |
| 44 } // namespace history |
| 45 |
| 46 #endif // COMPONENTS_HISTORY_CORE_BROWSER_VISIT_DELEGATE_H_ |
OLD | NEW |