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