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

Unified Diff: components/favicon/core/favicon_driver.cc

Issue 1064823002: Componentize FaviconTabHelper (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@favicon-notification
Patch Set: Fix BUILD.gn Created 5 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/favicon/core/favicon_driver.h ('k') | components/favicon/core/favicon_driver_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/favicon/core/favicon_driver.cc
diff --git a/components/favicon/core/favicon_driver.cc b/components/favicon/core/favicon_driver.cc
new file mode 100644
index 0000000000000000000000000000000000000000..00632292c6a889942a4a546c958d870bc6353b7e
--- /dev/null
+++ b/components/favicon/core/favicon_driver.cc
@@ -0,0 +1,35 @@
+// Copyright 2015 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/favicon/core/favicon_driver.h"
+
+#include "components/favicon/core/favicon_driver_observer.h"
+
+namespace favicon {
+
+void FaviconDriver::AddObserver(FaviconDriverObserver* observer) {
+ observer_list_.AddObserver(observer);
+}
+
+void FaviconDriver::RemoveObserver(FaviconDriverObserver* observer) {
+ observer_list_.RemoveObserver(observer);
+}
+
+FaviconDriver::FaviconDriver() {
+}
+
+FaviconDriver::~FaviconDriver() {
+}
+
+void FaviconDriver::NotifyFaviconAvailable(const gfx::Image& image) {
+ FOR_EACH_OBSERVER(FaviconDriverObserver, observer_list_,
+ OnFaviconAvailable(image));
+}
+
+void FaviconDriver::NotifyFaviconUpdated(bool icon_url_changed) {
+ FOR_EACH_OBSERVER(FaviconDriverObserver, observer_list_,
+ OnFaviconUpdated(this, icon_url_changed));
+}
+
+} // namespace favicon
« no previous file with comments | « components/favicon/core/favicon_driver.h ('k') | components/favicon/core/favicon_driver_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698