| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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_UI_CRW_WEB_DELEGATE_H_ | 5 #ifndef IOS_WEB_PUBLIC_WEB_STATE_UI_CRW_WEB_DELEGATE_H_ |
| 6 #define IOS_WEB_PUBLIC_WEB_STATE_UI_CRW_WEB_DELEGATE_H_ | 6 #define IOS_WEB_PUBLIC_WEB_STATE_UI_CRW_WEB_DELEGATE_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 #import <UIKit/UIKit.h> | 9 #import <UIKit/UIKit.h> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 // TODO(rohitrao): This is not a great API. Clean it up. | 64 // TODO(rohitrao): This is not a great API. Clean it up. |
| 65 - (void)webWillInitiateLoadWithParams: | 65 - (void)webWillInitiateLoadWithParams: |
| 66 (web::NavigationManager::WebLoadParams&)params; | 66 (web::NavigationManager::WebLoadParams&)params; |
| 67 - (void)webDidUpdateSessionForLoadWithParams: | 67 - (void)webDidUpdateSessionForLoadWithParams: |
| 68 (const web::NavigationManager::WebLoadParams&)params | 68 (const web::NavigationManager::WebLoadParams&)params |
| 69 wasInitialNavigation:(BOOL)initialNavigation; | 69 wasInitialNavigation:(BOOL)initialNavigation; |
| 70 // Called from finishHistoryNavigationFromEntry. | 70 // Called from finishHistoryNavigationFromEntry. |
| 71 // TODO(crbug.com/692331): Remove this method and use |DidFinishNavigation|. | 71 // TODO(crbug.com/692331): Remove this method and use |DidFinishNavigation|. |
| 72 - (void)webWillFinishHistoryNavigation; | 72 - (void)webWillFinishHistoryNavigation; |
| 73 | 73 |
| 74 // --------------------------------------------------------------------- | |
| 75 // Called when |webController| wants to open a new window. |URL| is the URL of | |
| 76 // the new window; |openerURL| is the URL of the page which requested a window | |
| 77 // to be open; |initiatedByUser| is YES if action was caused by the user. | |
| 78 // |webController| will not open a window if this method returns nil. This | |
| 79 // method can not return |webController|. | |
| 80 - (CRWWebController*)webController:(CRWWebController*)webController | |
| 81 createWebControllerForURL:(const GURL&)URL | |
| 82 openerURL:(const GURL&)openerURL | |
| 83 initiatedByUser:(BOOL)initiatedByUser; | |
| 84 | |
| 85 @optional | 74 @optional |
| 86 | 75 |
| 87 // Called to ask CRWWebDelegate if |CRWWebController| should open the given URL. | 76 // Called to ask CRWWebDelegate if |CRWWebController| should open the given URL. |
| 88 // CRWWebDelegate can intercept the request by returning NO and processing URL | 77 // CRWWebDelegate can intercept the request by returning NO and processing URL |
| 89 // in own way. | 78 // in own way. |
| 90 - (BOOL)webController:(CRWWebController*)webController | 79 - (BOOL)webController:(CRWWebController*)webController |
| 91 shouldOpenURL:(const GURL&)url | 80 shouldOpenURL:(const GURL&)url |
| 92 mainDocumentURL:(const GURL&)mainDocumentURL | 81 mainDocumentURL:(const GURL&)mainDocumentURL |
| 93 linkClicked:(BOOL)linkClicked; | 82 linkClicked:(BOOL)linkClicked; |
| 94 | 83 |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 // Called when a PassKit file is downloaded. |data| should be the data from a | 123 // Called when a PassKit file is downloaded. |data| should be the data from a |
| 135 // PassKit file, but this is not guaranteed, and the delegate is responsible for | 124 // PassKit file, but this is not guaranteed, and the delegate is responsible for |
| 136 // error handling non PassKit data using -[PKPass initWithData:error:]. If the | 125 // error handling non PassKit data using -[PKPass initWithData:error:]. If the |
| 137 // download does not successfully complete, |data| will be nil. | 126 // download does not successfully complete, |data| will be nil. |
| 138 - (void)webController:(CRWWebController*)webController | 127 - (void)webController:(CRWWebController*)webController |
| 139 didLoadPassKitObject:(NSData*)data; | 128 didLoadPassKitObject:(NSData*)data; |
| 140 | 129 |
| 141 @end | 130 @end |
| 142 | 131 |
| 143 #endif // IOS_WEB_PUBLIC_WEB_STATE_UI_CRW_WEB_DELEGATE_H_ | 132 #endif // IOS_WEB_PUBLIC_WEB_STATE_UI_CRW_WEB_DELEGATE_H_ |
| OLD | NEW |