| 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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 // Consults the delegate whether a form should be resubmitted for a request. | 102 // Consults the delegate whether a form should be resubmitted for a request. |
| 103 // Occurs when a POST request is reached when navigating through history. | 103 // Occurs when a POST request is reached when navigating through history. |
| 104 // Call |continueBlock| if a form should be resubmitted. | 104 // Call |continueBlock| if a form should be resubmitted. |
| 105 // Call |cancelBlock| if a form should not be resubmitted. | 105 // Call |cancelBlock| if a form should not be resubmitted. |
| 106 // Delegates must call either of these (just once) before the load will | 106 // Delegates must call either of these (just once) before the load will |
| 107 // continue. | 107 // continue. |
| 108 - (void)webController:(CRWWebController*)webController | 108 - (void)webController:(CRWWebController*)webController |
| 109 onFormResubmissionForRequest:(NSURLRequest*)request | 109 onFormResubmissionForRequest:(NSURLRequest*)request |
| 110 continueBlock:(ProceduralBlock)continueBlock | 110 continueBlock:(ProceduralBlock)continueBlock |
| 111 cancelBlock:(ProceduralBlock)cancelBlock; | 111 cancelBlock:(ProceduralBlock)cancelBlock; |
| 112 // Returns the unique id of the download request and starts downloading the | |
| 113 // image at |url| without sending the cookies. Invokes |callback| on completion. | |
| 114 - (int)downloadImageAtUrl:(const GURL&)url | |
| 115 maxBitmapSize:(uint32_t)maxBitmapSize | |
| 116 callback:(const web::WebState::ImageDownloadCallback&)callback; | |
| 117 | 112 |
| 118 // --------------------------------------------------------------------- | 113 // --------------------------------------------------------------------- |
| 119 // TODO(rohitrao): Eliminate as many of the following delegate methods as | 114 // TODO(rohitrao): Eliminate as many of the following delegate methods as |
| 120 // possible. They only exist because the Tab and CRWWebController logic was | 115 // possible. They only exist because the Tab and CRWWebController logic was |
| 121 // very intertwined. We should streamline the logic to jump between classes | 116 // very intertwined. We should streamline the logic to jump between classes |
| 122 // less, then remove any delegate method that becomes unneccessary as a result. | 117 // less, then remove any delegate method that becomes unneccessary as a result. |
| 123 | 118 |
| 124 // Called when the page is reloaded. | 119 // Called when the page is reloaded. |
| 125 - (void)webWillReload; | 120 - (void)webWillReload; |
| 126 // Called when a page is loaded using loadWithParams. In | 121 // Called when a page is loaded using loadWithParams. In |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 // Called when a PassKit file is downloaded. |data| should be the data from a | 204 // Called when a PassKit file is downloaded. |data| should be the data from a |
| 210 // PassKit file, but this is not guaranteed, and the delegate is responsible for | 205 // PassKit file, but this is not guaranteed, and the delegate is responsible for |
| 211 // error handling non PassKit data using -[PKPass initWithData:error:]. If the | 206 // error handling non PassKit data using -[PKPass initWithData:error:]. If the |
| 212 // download does not successfully complete, |data| will be nil. | 207 // download does not successfully complete, |data| will be nil. |
| 213 - (void)webController:(CRWWebController*)webController | 208 - (void)webController:(CRWWebController*)webController |
| 214 didLoadPassKitObject:(NSData*)data; | 209 didLoadPassKitObject:(NSData*)data; |
| 215 | 210 |
| 216 @end | 211 @end |
| 217 | 212 |
| 218 #endif // IOS_WEB_PUBLIC_WEB_STATE_UI_CRW_WEB_DELEGATE_H_ | 213 #endif // IOS_WEB_PUBLIC_WEB_STATE_UI_CRW_WEB_DELEGATE_H_ |
| OLD | NEW |