| Index: components/history/core/browser/top_sites.cc
|
| diff --git a/components/history/core/browser/top_sites.cc b/components/history/core/browser/top_sites.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..535ba14013b2f4a8ed16a11b7e62f3d2ab18a06c
|
| --- /dev/null
|
| +++ b/components/history/core/browser/top_sites.cc
|
| @@ -0,0 +1,47 @@
|
| +// Copyright (c) 2013 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include "components/history/core/browser/top_sites.h"
|
| +
|
| +namespace history {
|
| +
|
| +PrepopulatedPage::PrepopulatedPage()
|
| + : url(), favicon_id(-1), thumbnail_id(-1), color() {
|
| +}
|
| +
|
| +PrepopulatedPage::PrepopulatedPage(const GURL& url,
|
| + const base::string16& title,
|
| + int favicon_id,
|
| + int thumbnail_id,
|
| + SkColor color)
|
| + : url(url, title),
|
| + favicon_id(favicon_id),
|
| + thumbnail_id(thumbnail_id),
|
| + color(color) {
|
| + this->url.redirects.push_back(url);
|
| +}
|
| +
|
| +TopSites::TopSites() {
|
| +}
|
| +
|
| +TopSites::~TopSites() {
|
| +}
|
| +
|
| +void TopSites::AddObserver(TopSitesObserver* observer) {
|
| + observer_list_.AddObserver(observer);
|
| +}
|
| +
|
| +void TopSites::RemoveObserver(TopSitesObserver* observer) {
|
| + observer_list_.RemoveObserver(observer);
|
| +}
|
| +
|
| +void TopSites::NotifyTopSitesLoaded() {
|
| + FOR_EACH_OBSERVER(TopSitesObserver, observer_list_, TopSitesLoaded(this));
|
| +}
|
| +
|
| +void TopSites::NotifyTopSitesChanged() {
|
| + FOR_EACH_OBSERVER(TopSitesObserver, observer_list_, TopSitesChanged(this));
|
| +}
|
| +
|
| +} // namespace history
|
|
|