| OLD | NEW | 
|---|
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_NTP_TILES_MOST_VISITED_SITES_H_ | 5 #ifndef COMPONENTS_NTP_TILES_MOST_VISITED_SITES_H_ | 
| 6 #define COMPONENTS_NTP_TILES_MOST_VISITED_SITES_H_ | 6 #define COMPONENTS_NTP_TILES_MOST_VISITED_SITES_H_ | 
| 7 | 7 | 
| 8 #include <stddef.h> | 8 #include <stddef.h> | 
| 9 | 9 | 
| 10 #include <memory> | 10 #include <memory> | 
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 69   virtual bool IsChildProfile() = 0; | 69   virtual bool IsChildProfile() = 0; | 
| 70 | 70 | 
| 71  protected: | 71  protected: | 
| 72   virtual ~MostVisitedSitesSupervisor() {} | 72   virtual ~MostVisitedSitesSupervisor() {} | 
| 73 }; | 73 }; | 
| 74 | 74 | 
| 75 // Tracks the list of most visited sites and their thumbnails. | 75 // Tracks the list of most visited sites and their thumbnails. | 
| 76 class MostVisitedSites : public history::TopSitesObserver, | 76 class MostVisitedSites : public history::TopSitesObserver, | 
| 77                          public MostVisitedSitesSupervisor::Observer { | 77                          public MostVisitedSitesSupervisor::Observer { | 
| 78  public: | 78  public: | 
| 79   using PopularSitesVector = std::vector<PopularSites::Site>; |  | 
| 80 |  | 
| 81   // The observer to be notified when the list of most visited sites changes. | 79   // The observer to be notified when the list of most visited sites changes. | 
| 82   class Observer { | 80   class Observer { | 
| 83    public: | 81    public: | 
| 84     virtual void OnMostVisitedURLsAvailable(const NTPTilesVector& tiles) = 0; | 82     virtual void OnMostVisitedURLsAvailable(const NTPTilesVector& tiles) = 0; | 
| 85     virtual void OnIconMadeAvailable(const GURL& site_url) = 0; | 83     virtual void OnIconMadeAvailable(const GURL& site_url) = 0; | 
| 86 | 84 | 
| 87    protected: | 85    protected: | 
| 88     virtual ~Observer() {} | 86     virtual ~Observer() {} | 
| 89   }; | 87   }; | 
| 90 | 88 | 
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 198 | 196 | 
| 199   // For callbacks may be run after destruction. | 197   // For callbacks may be run after destruction. | 
| 200   base::WeakPtrFactory<MostVisitedSites> weak_ptr_factory_; | 198   base::WeakPtrFactory<MostVisitedSites> weak_ptr_factory_; | 
| 201 | 199 | 
| 202   DISALLOW_COPY_AND_ASSIGN(MostVisitedSites); | 200   DISALLOW_COPY_AND_ASSIGN(MostVisitedSites); | 
| 203 }; | 201 }; | 
| 204 | 202 | 
| 205 }  // namespace ntp_tiles | 203 }  // namespace ntp_tiles | 
| 206 | 204 | 
| 207 #endif  // COMPONENTS_NTP_TILES_MOST_VISITED_SITES_H_ | 205 #endif  // COMPONENTS_NTP_TILES_MOST_VISITED_SITES_H_ | 
| OLD | NEW | 
|---|