Chromium Code Reviews| 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 c54cbad34544e7e05d76704662209acf42d30efc..1e65c1c707aa6c58868261b70111b3f8c1fe4f95 100644 |
| --- a/ios/web/public/web_state/web_state.h |
| +++ b/ios/web/public/web_state/web_state.h |
| @@ -57,7 +57,11 @@ class WebState : public base::SupportsUserData { |
| explicit CreateParams(web::BrowserState* browser_state); |
| ~CreateParams(); |
| + // The corresponding BrowserState for the new WebState. |
| web::BrowserState* browser_state; |
| + |
| + // Whether the WebState is created as the result of a window.open |
| + bool opened_by_dom; |
|
Eugene But (OOO till 7-30)
2017/03/16 15:31:19
Content has this boolean, which actually better re
kkhorimoto
2017/03/17 23:04:49
Done.
|
| }; |
| // Parameters for the OpenURL() method. |
| @@ -230,6 +234,10 @@ class WebState : public base::SupportsUserData { |
| // Returns Mojo interface registry for this WebState. |
| virtual service_manager::InterfaceRegistry* GetMojoInterfaceRegistry() = 0; |
| + // Returns whether this WebState was created via a call to window.open or by |
| + // clicking a link with a blank targer. |
| + virtual bool IsOpenedByDOM() const = 0; |
|
Eugene But (OOO till 7-30)
2017/03/16 15:31:19
Is this the same as content's HasOpener() ?
kkhorimoto
2017/03/17 23:04:49
Yes, it looks like it. I've updated the naming.
|
| + |
| protected: |
| friend class WebStateObserver; |
| friend class WebStatePolicyDecider; |