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

Unified Diff: ios/web/public/test/test_web_state.h

Issue 2559693003: [ObjC ARC] Converts ios/chrome/browser/passwords:unit_tests to ARC. (Closed)
Patch Set: Cleanup Created 4 years 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
Index: ios/web/public/test/test_web_state.h
diff --git a/ios/web/public/test/test_web_state.h b/ios/web/public/test/test_web_state.h
index c156c80e6242a10e1658d327eedec0dbd2ec5ec1..4b7f139c28783ec1152941500971a99266647124 100644
--- a/ios/web/public/test/test_web_state.h
+++ b/ios/web/public/test/test_web_state.h
@@ -9,6 +9,7 @@
#include <string>
+#include "base/observer_list.h"
#include "base/strings/string16.h"
#include "ios/web/public/web_state/url_verification_constants.h"
#include "ios/web/public/web_state/web_state.h"
@@ -57,8 +58,11 @@ class TestWebState : public WebState {
CRWWebViewProxyType GetWebViewProxy() const override;
bool IsShowingWebInterstitial() const override;
WebInterstitial* GetWebInterstitial() const override;
- void AddObserver(WebStateObserver* observer) override {}
- void RemoveObserver(WebStateObserver* observer) override {}
+
+ void AddObserver(WebStateObserver* observer) override;
+
+ void RemoveObserver(WebStateObserver* observer) override;
+
void AddPolicyDecider(WebStatePolicyDecider* decider) override {}
void RemovePolicyDecider(WebStatePolicyDecider* decider) override {}
int DownloadImage(const GURL& url,
@@ -84,6 +88,9 @@ class TestWebState : public WebState {
bool content_is_html_;
std::string mime_type_;
std::string content_language_;
+
+ // A list of observers notified when page state changes. Weak references.
+ base::ObserverList<WebStateObserver, true> observers_;
};
} // namespace web

Powered by Google App Engine
This is Rietveld 408576698