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

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

Issue 2755823002: Moved |openedByDOM| to WebState's CreateParams and public interface. (Closed)
Patch Set: BVC session controller cleanup Created 3 years, 9 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/web_state/web_state_impl.h
diff --git a/ios/web/web_state/web_state_impl.h b/ios/web/web_state/web_state_impl.h
index 05a2869e46b46130c0c785491ed413991d447ab5..d28f281bbc3ddc04425c8526e5b16862f8a55bcd 100644
--- a/ios/web/web_state/web_state_impl.h
+++ b/ios/web/web_state/web_state_impl.h
@@ -63,9 +63,9 @@ class WebUIIOS;
class WebStateImpl : public WebState, public NavigationManagerDelegate {
public:
// Constructor for WebStateImpls created for new sessions.
- WebStateImpl(BrowserState* browser_state);
+ WebStateImpl(const CreateParams& params);
// Constructor for WebStatesImpls created for deserialized sessions
- WebStateImpl(BrowserState* browser_state, CRWSessionStorage* session_storage);
+ WebStateImpl(const CreateParams& params, CRWSessionStorage* session_storage);
~WebStateImpl() override;
// Gets/Sets the CRWWebController that backs this object.
@@ -233,6 +233,7 @@ class WebStateImpl : public WebState, public NavigationManagerDelegate {
void RemoveScriptCommandCallback(const std::string& command_prefix) override;
id<CRWWebViewProxy> GetWebViewProxy() const override;
service_manager::InterfaceRegistry* GetMojoInterfaceRegistry() override;
+ bool IsOpenedByDOM() const override;
base::WeakPtr<WebState> AsWeakPtr() override;
// Adds |interstitial|'s view to the web controller's content view.
@@ -360,6 +361,9 @@ class WebStateImpl : public WebState, public NavigationManagerDelegate {
// Callbacks associated to command prefixes.
std::map<std::string, ScriptCommandCallback> script_command_callbacks_;
+ // Whether this WebState is associated with a session opened via window.open.
+ bool opened_by_dom_;
+
// Member variables should appear before the WeakPtrFactory<> to ensure that
// any WeakPtrs to WebStateImpl are invalidated before its member variable's
// destructors are executed, rendering them invalid.

Powered by Google App Engine
This is Rietveld 408576698