| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 #include "components/favicon/core/favicon_driver.h" | 5 #include "components/favicon/core/favicon_driver.h" |
| 6 | 6 |
| 7 #include "components/bookmarks/browser/bookmark_model.h" |
| 8 |
| 7 namespace favicon { | 9 namespace favicon { |
| 8 | 10 |
| 9 void FaviconDriver::AddObserver(FaviconDriverObserver* observer) { | 11 void FaviconDriver::AddObserver(FaviconDriverObserver* observer) { |
| 10 observer_list_.AddObserver(observer); | 12 observer_list_.AddObserver(observer); |
| 11 } | 13 } |
| 12 | 14 |
| 13 void FaviconDriver::RemoveObserver(FaviconDriverObserver* observer) { | 15 void FaviconDriver::RemoveObserver(FaviconDriverObserver* observer) { |
| 14 observer_list_.RemoveObserver(observer); | 16 observer_list_.RemoveObserver(observer); |
| 15 } | 17 } |
| 16 | 18 |
| 17 FaviconDriver::FaviconDriver() { | 19 FaviconDriver::FaviconDriver() { |
| 18 } | 20 } |
| 19 | 21 |
| 20 FaviconDriver::~FaviconDriver() { | 22 FaviconDriver::~FaviconDriver() { |
| 21 } | 23 } |
| 22 | 24 |
| 23 void FaviconDriver::NotifyFaviconUpdatedObservers( | 25 void FaviconDriver::NotifyFaviconUpdatedObservers( |
| 24 FaviconDriverObserver::NotificationIconType notification_icon_type, | 26 FaviconDriverObserver::NotificationIconType notification_icon_type, |
| 25 const GURL& icon_url, | 27 const GURL& icon_url, |
| 26 bool icon_url_changed, | 28 bool icon_url_changed, |
| 27 const gfx::Image& image) { | 29 const gfx::Image& image) { |
| 28 for (FaviconDriverObserver& observer : observer_list_) { | 30 for (FaviconDriverObserver& observer : observer_list_) { |
| 29 observer.OnFaviconUpdated(this, notification_icon_type, icon_url, | 31 observer.OnFaviconUpdated(this, notification_icon_type, icon_url, |
| 30 icon_url_changed, image); | 32 icon_url_changed, image); |
| 31 } | 33 } |
| 32 } | 34 } |
| 33 | 35 |
| 34 } // namespace favicon | 36 } // namespace favicon |
| OLD | NEW |