summaryrefslogtreecommitdiffstats
path: root/ios
diff options
context:
space:
mode:
authorsdefresne <sdefresne@chromium.org>2015-04-02 08:03:19 -0700
committerCommit bot <commit-bot@chromium.org>2015-04-02 15:03:39 +0000
commitf155684660796877ecadb6ac8ca1a7620f483beb (patch)
tree8dec12ce9be54074b0884fc7899cccf627fb1e34 /ios
parentd1d56f1c8b487e06318eec8a920ce0142e23b36d (diff)
downloadchromium_src-f155684660796877ecadb6ac8ca1a7620f483beb.zip
chromium_src-f155684660796877ecadb6ac8ca1a7620f483beb.tar.gz
chromium_src-f155684660796877ecadb6ac8ca1a7620f483beb.tar.bz2
Add FaviconURLUpdated method to WebStateObserver
Mirror the method DidUpdateFaviconURL on WebContentsObserver but follow the naming convention used by the other methods of WebStateObserver. BUG=472117 Review URL: https://codereview.chromium.org/1055793002 Cr-Commit-Position: refs/heads/master@{#323486}
Diffstat (limited to 'ios')
-rw-r--r--ios/web/public/web_state/crw_web_delegate.h3
-rw-r--r--ios/web/public/web_state/web_state_observer.h5
2 files changed, 8 insertions, 0 deletions
diff --git a/ios/web/public/web_state/crw_web_delegate.h b/ios/web/public/web_state/crw_web_delegate.h
index 991df4a..a73d318 100644
--- a/ios/web/public/web_state/crw_web_delegate.h
+++ b/ios/web/public/web_state/crw_web_delegate.h
@@ -134,6 +134,9 @@ typedef void (^SSLErrorCallback)(BOOL);
// document change.
- (void)webDidUpdateHistoryStateWithPageURL:(const GURL&)pageUrl;
// Called when the page updates its icons.
+// TODO(sdefresne): this method will be removed once WebFaviconDriver is
+// introduced. Do not add anything there, instead use a WebStateObvserver.
+// http://crbug.com/472117
- (void)onUpdateFavicons:(const std::vector<web::FaviconURL>&)icons;
// Called when a placeholder image should be displayed instead of the WebView.
- (void)webController:(CRWWebController*)webController
diff --git a/ios/web/public/web_state/web_state_observer.h b/ios/web/public/web_state/web_state_observer.h
index 443dcf1..da00148 100644
--- a/ios/web/public/web_state/web_state_observer.h
+++ b/ios/web/public/web_state/web_state_observer.h
@@ -6,11 +6,13 @@
#define IOS_WEB_PUBLIC_WEB_STATE_WEB_STATE_OBSERVER_H_
#include <string>
+#include <vector>
#include "base/macros.h"
namespace web {
+struct FaviconURL;
struct LoadCommittedDetails;
class WebState;
class WebStateImpl;
@@ -62,6 +64,9 @@ class WebStateObserver {
int key_code,
bool error) {}
+ // Invoked when new FaviconURL candidates are received.
+ virtual void FaviconURLUpdated(const std::vector<FaviconURL>& candidates) {}
+
// Invoked when the WebState is being destroyed. Gives subclasses a chance
// to cleanup.
virtual void WebStateDestroyed() {}