| 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 retrievePlaceholderOverlayImage:(void (^)(UIImage*))block; | 45 retrievePlaceholderOverlayImage:(void (^)(UIImage*))block; |
| 46 | 46 |
| 47 // --------------------------------------------------------------------- | 47 // --------------------------------------------------------------------- |
| 48 // TODO(rohitrao): Eliminate as many of the following delegate methods as | 48 // TODO(rohitrao): Eliminate as many of the following delegate methods as |
| 49 // possible. They only exist because the Tab and CRWWebController logic was | 49 // possible. They only exist because the Tab and CRWWebController logic was |
| 50 // very intertwined. We should streamline the logic to jump between classes | 50 // very intertwined. We should streamline the logic to jump between classes |
| 51 // less, then remove any delegate method that becomes unneccessary as a result. | 51 // less, then remove any delegate method that becomes unneccessary as a result. |
| 52 | 52 |
| 53 // Called when the page is reloaded. | 53 // Called when the page is reloaded. |
| 54 - (void)webWillReload; | 54 - (void)webWillReload; |
| 55 // Called when a page is loaded using loadWithParams. In | 55 // Called when a page is loaded using loadWithParams. |
| 56 // |webWillInitiateLoadWithParams|, the |params| argument is non-const so that | |
| 57 // the delegate can make changes if necessary. | |
| 58 // TODO(rohitrao): This is not a great API. Clean it up. | |
| 59 - (void)webWillInitiateLoadWithParams: | |
| 60 (web::NavigationManager::WebLoadParams&)params; | |
| 61 - (void)webDidUpdateSessionForLoadWithParams: | 56 - (void)webDidUpdateSessionForLoadWithParams: |
| 62 (const web::NavigationManager::WebLoadParams&)params | 57 (const web::NavigationManager::WebLoadParams&)params |
| 63 wasInitialNavigation:(BOOL)initialNavigation; | 58 wasInitialNavigation:(BOOL)initialNavigation; |
| 64 | 59 |
| 65 @optional | 60 @optional |
| 66 | 61 |
| 67 // Called to ask CRWWebDelegate if |CRWWebController| should open the given URL. | 62 // Called to ask CRWWebDelegate if |CRWWebController| should open the given URL. |
| 68 // CRWWebDelegate can intercept the request by returning NO and processing URL | 63 // CRWWebDelegate can intercept the request by returning NO and processing URL |
| 69 // in own way. | 64 // in own way. |
| 70 - (BOOL)webController:(CRWWebController*)webController | 65 - (BOOL)webController:(CRWWebController*)webController |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 // Called when a PassKit file is downloaded. |data| should be the data from a | 99 // Called when a PassKit file is downloaded. |data| should be the data from a |
| 105 // PassKit file, but this is not guaranteed, and the delegate is responsible for | 100 // PassKit file, but this is not guaranteed, and the delegate is responsible for |
| 106 // error handling non PassKit data using -[PKPass initWithData:error:]. If the | 101 // error handling non PassKit data using -[PKPass initWithData:error:]. If the |
| 107 // download does not successfully complete, |data| will be nil. | 102 // download does not successfully complete, |data| will be nil. |
| 108 - (void)webController:(CRWWebController*)webController | 103 - (void)webController:(CRWWebController*)webController |
| 109 didLoadPassKitObject:(NSData*)data; | 104 didLoadPassKitObject:(NSData*)data; |
| 110 | 105 |
| 111 @end | 106 @end |
| 112 | 107 |
| 113 #endif // IOS_WEB_PUBLIC_WEB_STATE_UI_CRW_WEB_DELEGATE_H_ | 108 #endif // IOS_WEB_PUBLIC_WEB_STATE_UI_CRW_WEB_DELEGATE_H_ |
| OLD | NEW |