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

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

Issue 1891483005: [ios] Added API to enable/disable web usage for WebState. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Self review Created 4 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
Index: ios/web/public/test/test_web_state.mm
diff --git a/ios/web/public/test/test_web_state.mm b/ios/web/public/test/test_web_state.mm
index 1ed98150cd1417d99b614645587cfccd73e25648..296cb885f84c2505e9cc6bbf5242233d9096c987 100644
--- a/ios/web/public/test/test_web_state.mm
+++ b/ios/web/public/test/test_web_state.mm
@@ -11,14 +11,12 @@
namespace web {
TestWebState::TestWebState()
- : trust_level_(kAbsolute), content_is_html_(true) {}
+ : web_usage_enabled_(false),
+ trust_level_(kAbsolute),
+ content_is_html_(true) {}
TestWebState::~TestWebState() = default;
-UIView* TestWebState::GetView() {
- return nullptr;
-}
-
WebStateDelegate* TestWebState::GetDelegate() {
return nil;
}
@@ -29,6 +27,18 @@ BrowserState* TestWebState::GetBrowserState() const {
return nullptr;
}
+bool TestWebState::IsWebUsageEnabled() const {
+ return web_usage_enabled_;
+}
+
+void TestWebState::SetWebUsageEnabled(bool enabled) {
+ web_usage_enabled_ = enabled;
+}
+
+UIView* TestWebState::GetView() {
+ return nullptr;
+}
+
NavigationManager* TestWebState::GetNavigationManager() {
return nullptr;
}

Powered by Google App Engine
This is Rietveld 408576698