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

Side by Side Diff: ios/web/public/web_state/web_state.h

Issue 2094633004: [ios] Added DialogsSuppression public API to WebState. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed compilation Created 4 years, 6 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 unified diff | Download patch
« no previous file with comments | « ios/web/public/test/test_web_state.mm ('k') | ios/web/web_state/web_state_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef IOS_WEB_PUBLIC_WEB_STATE_WEB_STATE_H_ 5 #ifndef IOS_WEB_PUBLIC_WEB_STATE_WEB_STATE_H_
6 #define IOS_WEB_PUBLIC_WEB_STATE_WEB_STATE_H_ 6 #define IOS_WEB_PUBLIC_WEB_STATE_WEB_STATE_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 103
104 // Gets/Sets the delegate. 104 // Gets/Sets the delegate.
105 virtual WebStateDelegate* GetDelegate() = 0; 105 virtual WebStateDelegate* GetDelegate() = 0;
106 virtual void SetDelegate(WebStateDelegate* delegate) = 0; 106 virtual void SetDelegate(WebStateDelegate* delegate) = 0;
107 107
108 // Whether or not a web view is allowed to exist in this WebState. Defaults 108 // Whether or not a web view is allowed to exist in this WebState. Defaults
109 // to false; this should be enabled before attempting to access the view. 109 // to false; this should be enabled before attempting to access the view.
110 virtual bool IsWebUsageEnabled() const = 0; 110 virtual bool IsWebUsageEnabled() const = 0;
111 virtual void SetWebUsageEnabled(bool enabled) = 0; 111 virtual void SetWebUsageEnabled(bool enabled) = 0;
112 112
113 // Whether or not dialogs (JavaScript dialogs, HTTP auths and window.open)
114 // calls should be suppressed. Default is false.
115 virtual bool ShouldSuppressDialogs() const = 0;
116 virtual void SetShouldSuppressDialogs(bool should_suppress) = 0;
117
113 // The view containing the contents of the current web page. If the view has 118 // The view containing the contents of the current web page. If the view has
114 // been purged due to low memory, this will recreate it. It is up to the 119 // been purged due to low memory, this will recreate it. It is up to the
115 // caller to size the view. 120 // caller to size the view.
116 virtual UIView* GetView() = 0; 121 virtual UIView* GetView() = 0;
117 122
118 // Gets the BrowserState associated with this WebState. Can never return null. 123 // Gets the BrowserState associated with this WebState. Can never return null.
119 virtual BrowserState* GetBrowserState() const = 0; 124 virtual BrowserState* GetBrowserState() const = 0;
120 125
121 // Opens a URL with the given disposition. The transition specifies how this 126 // Opens a URL with the given disposition. The transition specifies how this
122 // navigation should be recorded in the history system (for example, typed). 127 // navigation should be recorded in the history system (for example, typed).
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 268
264 // Returns a WeakPtr<WebState> to the current WebState. Must remain private 269 // Returns a WeakPtr<WebState> to the current WebState. Must remain private
265 // and only call must be in WebStateWeakPtrFactory. Please consult that class 270 // and only call must be in WebStateWeakPtrFactory. Please consult that class
266 // for more details. Remove as part of http://crbug.com/556736. 271 // for more details. Remove as part of http://crbug.com/556736.
267 virtual base::WeakPtr<WebState> AsWeakPtr() = 0; 272 virtual base::WeakPtr<WebState> AsWeakPtr() = 0;
268 }; 273 };
269 274
270 } // namespace web 275 } // namespace web
271 276
272 #endif // IOS_WEB_PUBLIC_WEB_STATE_WEB_STATE_H_ 277 #endif // IOS_WEB_PUBLIC_WEB_STATE_WEB_STATE_H_
OLDNEW
« no previous file with comments | « ios/web/public/test/test_web_state.mm ('k') | ios/web/web_state/web_state_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698