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" |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
171 | 171 |
172 // Add Observer to the list. | 172 // Add Observer to the list. |
173 void AddObserver(TopSitesObserver* observer); | 173 void AddObserver(TopSitesObserver* observer); |
174 | 174 |
175 // Remove Observer from the list. | 175 // Remove Observer from the list. |
176 void RemoveObserver(TopSitesObserver* observer); | 176 void RemoveObserver(TopSitesObserver* observer); |
177 | 177 |
178 protected: | 178 protected: |
179 void NotifyTopSitesLoaded(); | 179 void NotifyTopSitesLoaded(); |
180 void NotifyTopSitesChanged(); | 180 void NotifyTopSitesChanged(); |
181 virtual ~TopSites(); | 181 ~TopSites() override; |
182 | 182 |
183 private: | 183 private: |
184 ObserverList<TopSitesObserver> observer_list_; | 184 ObserverList<TopSitesObserver> observer_list_; |
185 friend class base::RefCountedThreadSafe<TopSites>; | 185 friend class base::RefCountedThreadSafe<TopSites>; |
186 }; | 186 }; |
187 | 187 |
188 #if defined(OS_ANDROID) | 188 #if defined(OS_ANDROID) |
189 const int kPrepopulatedPagesCount = 0; | 189 const int kPrepopulatedPagesCount = 0; |
190 #else | 190 #else |
191 const int kPrepopulatedPagesCount = 2; | 191 const int kPrepopulatedPagesCount = 2; |
192 #endif | 192 #endif |
193 extern const TopSites::PrepopulatedPage | 193 extern const TopSites::PrepopulatedPage |
194 kPrepopulatedPages[kPrepopulatedPagesCount]; | 194 kPrepopulatedPages[kPrepopulatedPagesCount]; |
195 | 195 |
196 } // namespace history | 196 } // namespace history |
197 | 197 |
198 #endif // CHROME_BROWSER_HISTORY_TOP_SITES_H_ | 198 #endif // CHROME_BROWSER_HISTORY_TOP_SITES_H_ |
OLD | NEW |