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 COMPONENTS_VISITEDLINK_BROWSER_VISITEDLINK_DELEGATE_H_ | 5 #ifndef COMPONENTS_VISITEDLINK_BROWSER_VISITEDLINK_DELEGATE_H_ |
6 #define COMPONENTS_VISITEDLINK_BROWSER_VISITEDLINK_DELEGATE_H_ | 6 #define COMPONENTS_VISITEDLINK_BROWSER_VISITEDLINK_DELEGATE_H_ |
7 | 7 |
8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
9 | 9 |
10 class GURL; | 10 class GURL; |
11 | 11 |
12 namespace content { | |
13 class BrowserContext; | |
14 } | |
15 | |
16 namespace visitedlink { | 12 namespace visitedlink { |
17 | 13 |
18 // Delegate class that clients of VisitedLinkMaster must implement. | 14 // Delegate class that clients of VisitedLinkMaster must implement. |
19 class VisitedLinkDelegate { | 15 class VisitedLinkDelegate { |
20 public: | 16 public: |
21 // See RebuildTable. | 17 // See RebuildTable. |
22 class URLEnumerator : public base::RefCountedThreadSafe<URLEnumerator> { | 18 class URLEnumerator : public base::RefCountedThreadSafe<URLEnumerator> { |
23 public: | 19 public: |
24 // Call this with each URL to rebuild the table. | 20 // Call this with each URL to rebuild the table. |
25 virtual void OnURL(const GURL& url) = 0; | 21 virtual void OnURL(const GURL& url) = 0; |
(...skipping 16 matching lines...) Expand all Loading... |
42 // thread but the delegate is responsible for synchronizating the calls. | 38 // thread but the delegate is responsible for synchronizating the calls. |
43 virtual void RebuildTable(const scoped_refptr<URLEnumerator>& enumerator) = 0; | 39 virtual void RebuildTable(const scoped_refptr<URLEnumerator>& enumerator) = 0; |
44 | 40 |
45 protected: | 41 protected: |
46 virtual ~VisitedLinkDelegate() {} | 42 virtual ~VisitedLinkDelegate() {} |
47 }; | 43 }; |
48 | 44 |
49 } // namespace visitedlink | 45 } // namespace visitedlink |
50 | 46 |
51 #endif // COMPONENTS_VISITEDLINK_BROWSER_VISITEDLINK_DELEGATE_H_ | 47 #endif // COMPONENTS_VISITEDLINK_BROWSER_VISITEDLINK_DELEGATE_H_ |
OLD | NEW |