Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Side by Side Diff: components/favicon/core/favicon_driver.cc

Issue 2691933004: Avoid cyclic dependency FaviconHandler<-->FaviconDriverImpl (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698