| 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 "base/observer_list.h" | 12 #include "base/observer_list.h" |
| 13 #include "base/task/cancelable_task_tracker.h" | 13 #include "base/task/cancelable_task_tracker.h" |
| 14 #include "components/history/core/browser/history_types.h" | 14 #include "components/history/core/browser/history_types.h" |
| 15 #include "components/history/core/browser/top_sites_observer.h" | |
| 16 #include "components/history/core/common/thumbnail_score.h" | 15 #include "components/history/core/common/thumbnail_score.h" |
| 17 #include "content/public/browser/notification_observer.h" | 16 #include "content/public/browser/notification_observer.h" |
| 17 #include "content/public/browser/notification_registrar.h" |
| 18 #include "third_party/skia/include/core/SkColor.h" | 18 #include "third_party/skia/include/core/SkColor.h" |
| 19 #include "ui/gfx/image/image.h" | 19 #include "ui/gfx/image/image.h" |
| 20 | 20 |
| 21 class GURL; | 21 class GURL; |
| 22 class Profile; | 22 class Profile; |
| 23 | 23 |
| 24 namespace base { | 24 namespace base { |
| 25 class FilePath; | 25 class FilePath; |
| 26 class RefCountedBytes; | 26 class RefCountedBytes; |
| 27 class RefCountedMemory; | 27 class RefCountedMemory; |
| 28 } | 28 } |
| 29 | 29 |
| 30 namespace history { | 30 namespace history { |
| 31 | 31 |
| 32 class TopSitesCache; | 32 class TopSitesCache; |
| 33 class TopSitesObserver; |
| 33 | 34 |
| 34 // Interface for TopSites, which stores the data for the top "most visited" | 35 // Interface for TopSites, which stores the data for the top "most visited" |
| 35 // sites. This includes a cache of the most visited data from history, as well | 36 // sites. This includes a cache of the most visited data from history, as well |
| 36 // as the corresponding thumbnails of those sites. | 37 // as the corresponding thumbnails of those sites. |
| 37 // | 38 // |
| 38 // Some methods should only be called from the UI thread (see method | 39 // Some methods should only be called from the UI thread (see method |
| 39 // descriptions below). All others are assumed to be threadsafe. | 40 // descriptions below). All others are assumed to be threadsafe. |
| 40 class TopSites | 41 class TopSites |
| 41 : public base::RefCountedThreadSafe<TopSites>, | 42 : public base::RefCountedThreadSafe<TopSites>, |
| 42 public content::NotificationObserver { | 43 public content::NotificationObserver { |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 191 const int kPrepopulatedPagesCount = 0; | 192 const int kPrepopulatedPagesCount = 0; |
| 192 #else | 193 #else |
| 193 const int kPrepopulatedPagesCount = 2; | 194 const int kPrepopulatedPagesCount = 2; |
| 194 #endif | 195 #endif |
| 195 extern const TopSites::PrepopulatedPage | 196 extern const TopSites::PrepopulatedPage |
| 196 kPrepopulatedPages[kPrepopulatedPagesCount]; | 197 kPrepopulatedPages[kPrepopulatedPagesCount]; |
| 197 | 198 |
| 198 } // namespace history | 199 } // namespace history |
| 199 | 200 |
| 200 #endif // CHROME_BROWSER_HISTORY_TOP_SITES_H_ | 201 #endif // CHROME_BROWSER_HISTORY_TOP_SITES_H_ |
| OLD | NEW |