OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <list> | 9 #include <list> |
10 #include <set> | 10 #include <set> |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 // As this method may be invoked on any thread the ref count needs to be | 77 // As this method may be invoked on any thread the ref count needs to be |
78 // upped before this method returns, so this takes a scoped_refptr*. | 78 // upped before this method returns, so this takes a scoped_refptr*. |
79 bool GetPageThumbnail(const GURL& url, | 79 bool GetPageThumbnail(const GURL& url, |
80 scoped_refptr<RefCountedBytes>* bytes); | 80 scoped_refptr<RefCountedBytes>* bytes); |
81 | 81 |
82 // Get a thumbnail score for a given page. Returns true iff we have the | 82 // Get a thumbnail score for a given page. Returns true iff we have the |
83 // thumbnail score. This may be invoked on any thread. The score will | 83 // thumbnail score. This may be invoked on any thread. The score will |
84 // be copied to |score|. | 84 // be copied to |score|. |
85 virtual bool GetPageThumbnailScore(const GURL& url, ThumbnailScore* score); | 85 virtual bool GetPageThumbnailScore(const GURL& url, ThumbnailScore* score); |
86 | 86 |
| 87 // Get a temporary thumbnail score for a given page. Returns true iff we |
| 88 // have the thumbnail score. Useful when checking if we should update a |
| 89 // thumbnail for a given page. The score will be copied to |score|. |
| 90 bool GetTemporaryPageThumbnailScore(const GURL& url, ThumbnailScore* score); |
| 91 |
87 // Invoked from History if migration is needed. If this is invoked it will | 92 // Invoked from History if migration is needed. If this is invoked it will |
88 // be before HistoryLoaded is invoked. | 93 // be before HistoryLoaded is invoked. |
89 void MigrateFromHistory(); | 94 void MigrateFromHistory(); |
90 | 95 |
91 // Invoked with data from migrating thumbnails out of history. | 96 // Invoked with data from migrating thumbnails out of history. |
92 void FinishHistoryMigration(const ThumbnailMigration& data); | 97 void FinishHistoryMigration(const ThumbnailMigration& data); |
93 | 98 |
94 // Invoked from history when it finishes loading. If MigrateFromHistory was | 99 // Invoked from history when it finishes loading. If MigrateFromHistory was |
95 // not invoked at this point then we load from the top sites service. | 100 // not invoked at this point then we load from the top sites service. |
96 void HistoryLoaded(); | 101 void HistoryLoaded(); |
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
362 | 367 |
363 // Are we loaded? | 368 // Are we loaded? |
364 bool loaded_; | 369 bool loaded_; |
365 | 370 |
366 DISALLOW_COPY_AND_ASSIGN(TopSites); | 371 DISALLOW_COPY_AND_ASSIGN(TopSites); |
367 }; | 372 }; |
368 | 373 |
369 } // namespace history | 374 } // namespace history |
370 | 375 |
371 #endif // CHROME_BROWSER_HISTORY_TOP_SITES_H_ | 376 #endif // CHROME_BROWSER_HISTORY_TOP_SITES_H_ |
OLD | NEW |