summaryrefslogtreecommitdiffstats
path: root/components/favicon/core
diff options
context:
space:
mode:
authorjif@chromium.org <jif@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-04-08 17:23:28 +0000
committerjif@chromium.org <jif@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-04-08 17:23:28 +0000
commitbb6145c6a501b426f31fe320ccfb78590a2cc2e1 (patch)
tree0360526f8a99ebe0bb8351fcbc3a6869de64cb51 /components/favicon/core
parentcc7ec69533488692dc10fbefee96608805dcf796 (diff)
downloadchromium_src-bb6145c6a501b426f31fe320ccfb78590a2cc2e1.zip
chromium_src-bb6145c6a501b426f31fe320ccfb78590a2cc2e1.tar.gz
chromium_src-bb6145c6a501b426f31fe320ccfb78590a2cc2e1.tar.bz2
Moved favicon_handler_delegate.h to a new component directory.
BUG=359084 Review URL: https://codereview.chromium.org/226183003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@262443 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'components/favicon/core')
-rw-r--r--components/favicon/core/favicon_handler_delegate.h40
1 files changed, 40 insertions, 0 deletions
diff --git a/components/favicon/core/favicon_handler_delegate.h b/components/favicon/core/favicon_handler_delegate.h
new file mode 100644
index 0000000..2621902
--- /dev/null
+++ b/components/favicon/core/favicon_handler_delegate.h
@@ -0,0 +1,40 @@
+// Copyright 2014 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.
+
+#ifndef COMPONENTS_FAVICON_CORE_FAVICON_HANDLER_DELEGATE_H_
+#define COMPONENTS_FAVICON_CORE_FAVICON_HANDLER_DELEGATE_H_
+
+class GURL;
+
+namespace content {
+// TODO(jif): Abstract the NavigationEntry (crbug.com/359598).
+class NavigationEntry;
+}
+
+// This class provides a delegate interface for a FaviconHandler. It allows the
+// FaviconHandler to ask its delegate for information or notify its delegate
+// about changes.
+class FaviconHandlerDelegate {
+ public:
+ // Returns the current NavigationEntry.
+ // TODO(jif): Abstract the NavigationEntry (crbug.com/359598).
+ virtual content::NavigationEntry* GetActiveEntry() = 0;
+
+ // Starts the download for the given favicon. When finished, the delegate
+ // will call OnDidDownloadFavicon() with the results.
+ // Returns the unique id of the download request. The id will be passed
+ // in OnDidDownloadFavicon().
+ // Bitmaps with pixel sizes larger than |max_bitmap_size| are filtered out
+ // from the bitmap results. If there are no bitmap results <=
+ // |max_bitmap_size|, the smallest bitmap is resized to |max_bitmap_size| and
+ // is the only result. A |max_bitmap_size| of 0 means unlimited.
+ virtual int StartDownload(const GURL& url, int max_bitmap_size) = 0;
+
+ // Notifies the delegate that the favicon for the active entry was updated.
+ // |icon_url_changed| is true if a favicon with a different icon URL has
+ // been selected since the previous call to NotifyFaviconUpdated().
+ virtual void NotifyFaviconUpdated(bool icon_url_changed) = 0;
+};
+
+#endif // COMPONENTS_FAVICON_CORE_FAVICON_HANDLER_DELEGATE_H_