Chromium Code Reviews| Index: ios/web/public/web_state/ui/crw_web_delegate.h |
| diff --git a/ios/web/public/web_state/ui/crw_web_delegate.h b/ios/web/public/web_state/ui/crw_web_delegate.h |
| index d64f80440d08e8600d37124106b85985afba12c2..4069c877734b3919820be8f5b946faaca2e2b355 100644 |
| --- a/ios/web/public/web_state/ui/crw_web_delegate.h |
| +++ b/ios/web/public/web_state/ui/crw_web_delegate.h |
| @@ -21,32 +21,12 @@ class GURL; |
| @class CRWSessionEntry; |
| @class CRWWebController; |
| -namespace web { |
| -class BlockedPopupInfo; |
| -struct Referrer; |
| -} |
| - |
| // Methods implemented by the delegate of the CRWWebController. |
| // DEPRECATED, do not conform to this protocol and do not add any methods to it. |
| // Use web::WebStateDelegate instead. |
| // TODO(crbug.com/674991): Remove this protocol. |
| @protocol CRWWebDelegate<NSObject> |
| -// Called when the page wants to open a new window by DOM (e.g. with |
| -// |window.open| JavaScript call or by clicking a link with |_blank| target) or |
| -// wants to open a window with a new tab. |inBackground| allows a page to force |
| -// a new window to open in the background. CRWSessionController's openedByDOM |
| -// property of the returned CRWWebController must be YES. |
| -- (CRWWebController*)webPageOrderedOpen:(const GURL&)url |
| - referrer:(const web::Referrer&)referrer |
| - windowName:(NSString*)windowName |
| - inBackground:(BOOL)inBackground; |
| - |
| -// Called when the page wants to open a new window by DOM. |
| -// CRWSessionController's openedByDOM property of the returned CRWWebController |
| -// must be YES. |
| -- (CRWWebController*)webPageOrderedOpen; |
| - |
| // Called when the page calls window.close() on itself. Begin the shut-down |
| // sequence for this controller. |
| - (void)webPageOrderedClose; |
| @@ -103,6 +83,16 @@ struct Referrer; |
| - (void)webWillFinishHistoryNavigationFromEntry:(CRWSessionEntry*)fromEntry; |
| // --------------------------------------------------------------------- |
| +// Called when |webController| wants to open a new window. |URL| is the URL of |
| +// the new window; |openerURL| is the URL of the page which requested a window |
| +// to be open; |initiatedByUser| is YES if action was caused by the user. |
| +// |webController| will not open a window if this method returns nil. This |
| +// method can not return |webController|. |
| +- (CRWWebController*)webController:(CRWWebController*)webController |
| + createWebControllerForURL:(const GURL&)URL |
|
marq (ping after 24h)
2017/02/15 10:34:10
Naming nit: Delegate methods that return something
Eugene But (OOO till 7-30)
2017/02/15 16:46:59
Modeled from |webView:createWebViewWithConfigurati
marq (ping after 24h)
2017/02/16 12:49:44
Given that, I'm OK with leaving it as is.
|
| + openerURL:(const GURL&)openerURL |
| + initiatedByUser:(BOOL)initiatedByUser; |
| + |
| @optional |
| // Called to ask CRWWebDelegate if |CRWWebController| should open the given URL. |
| @@ -140,20 +130,6 @@ struct Referrer; |
| - (void)webController:(CRWWebController*)webController |
| titleDidChange:(NSString*)title; |
| -// Called when CRWWebController has detected a popup. If NO is returned then |
| -// popup will be shown, otherwise |webController:didBlockPopup:| will be called |
| -// and CRWWebDelegate will have a chance to unblock the popup later. NO is |
| -// assumed by default if this method is not implemented. |
| -- (BOOL)webController:(CRWWebController*)webController |
| - shouldBlockPopupWithURL:(const GURL&)popupURL |
| - sourceURL:(const GURL&)sourceURL; |
| - |
| -// Called when CRWWebController has detected and blocked a popup. In order to |
| -// allow the blocked pop up CRWWebDelegate must call |
| -// |blockedPopupInfo.ShowPopup()| instead of attempting to open a new window. |
| -- (void)webController:(CRWWebController*)webController |
| - didBlockPopup:(const web::BlockedPopupInfo&)blockedPopupInfo; |
| - |
| // Called when CRWWebController did suppress a dialog (JavaScript, HTTP |
| // authentication or window.open). |
| // NOTE: Called only if CRWWebController.shouldSuppressDialogs is set to YES. |