| OLD | NEW |
| (Empty) | |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "components/history/core/browser/top_sites.h" |
| 6 |
| 7 namespace history { |
| 8 |
| 9 PrepopulatedPage::PrepopulatedPage() |
| 10 : url(), favicon_id(-1), thumbnail_id(-1), color() { |
| 11 } |
| 12 |
| 13 PrepopulatedPage::PrepopulatedPage(const GURL& url, |
| 14 const base::string16& title, |
| 15 int favicon_id, |
| 16 int thumbnail_id, |
| 17 SkColor color) |
| 18 : url(url, title), |
| 19 favicon_id(favicon_id), |
| 20 thumbnail_id(thumbnail_id), |
| 21 color(color) { |
| 22 this->url.redirects.push_back(url); |
| 23 } |
| 24 |
| 25 TopSites::TopSites() { |
| 26 } |
| 27 |
| 28 TopSites::~TopSites() { |
| 29 } |
| 30 |
| 31 void TopSites::AddObserver(TopSitesObserver* observer) { |
| 32 observer_list_.AddObserver(observer); |
| 33 } |
| 34 |
| 35 void TopSites::RemoveObserver(TopSitesObserver* observer) { |
| 36 observer_list_.RemoveObserver(observer); |
| 37 } |
| 38 |
| 39 void TopSites::NotifyTopSitesLoaded() { |
| 40 FOR_EACH_OBSERVER(TopSitesObserver, observer_list_, TopSitesLoaded(this)); |
| 41 } |
| 42 |
| 43 void TopSites::NotifyTopSitesChanged() { |
| 44 FOR_EACH_OBSERVER(TopSitesObserver, observer_list_, TopSitesChanged(this)); |
| 45 } |
| 46 |
| 47 } // namespace history |
| OLD | NEW |