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_HISTORY_TOP_SITES_H_ | 5 #ifndef CHROME_BROWSER_HISTORY_TOP_SITES_H_ |
6 #define CHROME_BROWSER_HISTORY_TOP_SITES_H_ | 6 #define CHROME_BROWSER_HISTORY_TOP_SITES_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/callback.h" | 9 #include "base/callback.h" |
10 #include "base/gtest_prod_util.h" | 10 #include "base/gtest_prod_util.h" |
11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
12 #include "chrome/browser/common/cancelable_request.h" | |
13 #include "chrome/browser/history/history_service.h" | 12 #include "chrome/browser/history/history_service.h" |
14 #include "chrome/browser/history/history_types.h" | 13 #include "chrome/browser/history/history_types.h" |
15 #include "components/history/core/common/thumbnail_score.h" | 14 #include "components/history/core/common/thumbnail_score.h" |
16 #include "third_party/skia/include/core/SkColor.h" | 15 #include "third_party/skia/include/core/SkColor.h" |
17 #include "ui/gfx/image/image.h" | 16 #include "ui/gfx/image/image.h" |
18 | 17 |
19 class GURL; | 18 class GURL; |
20 class Profile; | 19 class Profile; |
21 | 20 |
22 namespace base { | 21 namespace base { |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 // thread. | 113 // thread. |
115 virtual bool IsBlacklisted(const GURL& url) = 0; | 114 virtual bool IsBlacklisted(const GURL& url) = 0; |
116 | 115 |
117 // Clear the blacklist. Should be called from the UI thread. | 116 // Clear the blacklist. Should be called from the UI thread. |
118 virtual void ClearBlacklistedURLs() = 0; | 117 virtual void ClearBlacklistedURLs() = 0; |
119 | 118 |
120 // Shuts down top sites. | 119 // Shuts down top sites. |
121 virtual void Shutdown() = 0; | 120 virtual void Shutdown() = 0; |
122 | 121 |
123 // Query history service for the list of available thumbnails. Returns the | 122 // Query history service for the list of available thumbnails. Returns the |
124 // handle for the request, or NULL if a request could not be made. | 123 // task id for the request, or |base::CancelableTaskTracker::kBadTaskId| if a |
125 // Public only for testing purposes. | 124 // request could not be made. Public only for testing purposes. |
126 virtual CancelableRequestProvider::Handle StartQueryForMostVisited() = 0; | 125 virtual base::CancelableTaskTracker::TaskId StartQueryForMostVisited() = 0; |
127 | 126 |
128 // Returns true if the given URL is known to the top sites service. | 127 // Returns true if the given URL is known to the top sites service. |
129 // This function also returns false if TopSites isn't loaded yet. | 128 // This function also returns false if TopSites isn't loaded yet. |
130 virtual bool IsKnownURL(const GURL& url) = 0; | 129 virtual bool IsKnownURL(const GURL& url) = 0; |
131 | 130 |
132 // Follows the cached redirect chain to convert any URL to its | 131 // Follows the cached redirect chain to convert any URL to its |
133 // canonical version. If no redirect chain is known for the URL, | 132 // canonical version. If no redirect chain is known for the URL, |
134 // return it without modification. | 133 // return it without modification. |
135 virtual const std::string& GetCanonicalURLString(const GURL& url) const = 0; | 134 virtual const std::string& GetCanonicalURLString(const GURL& url) const = 0; |
136 | 135 |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
177 | 176 |
178 #if defined(OS_ANDROID) | 177 #if defined(OS_ANDROID) |
179 extern const TopSites::PrepopulatedPage kPrepopulatedPages[1]; | 178 extern const TopSites::PrepopulatedPage kPrepopulatedPages[1]; |
180 #else | 179 #else |
181 extern const TopSites::PrepopulatedPage kPrepopulatedPages[2]; | 180 extern const TopSites::PrepopulatedPage kPrepopulatedPages[2]; |
182 #endif | 181 #endif |
183 | 182 |
184 } // namespace history | 183 } // namespace history |
185 | 184 |
186 #endif // CHROME_BROWSER_HISTORY_TOP_SITES_H_ | 185 #endif // CHROME_BROWSER_HISTORY_TOP_SITES_H_ |
OLD | NEW |