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

Unified Diff: ios/web/public/web_state/web_state.h

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/web_state/web_state.h
diff --git a/ios/web/public/web_state/web_state.h b/ios/web/public/web_state/web_state.h
index 0a7904930dd7f216fa1f45a18ca1a927410dc03f..d9dfe653e0a1beeb14bf928a6acf244a663a26b6 100644
--- a/ios/web/public/web_state/web_state.h
+++ b/ios/web/public/web_state/web_state.h
@@ -90,6 +90,11 @@ class WebState : public base::SupportsUserData {
virtual WebStateDelegate* GetDelegate() = 0;
virtual void SetDelegate(WebStateDelegate* delegate) = 0;
+ // Whether or not a web view is allowed to exist in this WebState. Defaults
+ // to false; this should be enabled before attempting to access the view.
+ virtual bool IsWebUsageEnabled() const = 0;
+ virtual void SetWebUsageEnabled(bool enabled) = 0;
+
// The view containing the contents of the current web page. If the view has
// been purged due to low memory, this will recreate it. It is up to the
// caller to size the view.
« no previous file with comments | « ios/web/public/test/test_web_state.mm ('k') | ios/web/shell/DEPS » ('j') | ios/web/shell/DEPS » ('J')

Powered by Google App Engine
This is Rietveld 408576698