| 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 // Called when a placeholder image should be displayed instead of the WebView. | 43 // Called when a placeholder image should be displayed instead of the WebView. |
| 44 - (void)webController:(CRWWebController*)webController | 44 - (void)webController:(CRWWebController*)webController |
| 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. | |
| 54 - (void)webWillReload; | |
| 55 // Called when a page is loaded using loadWithParams. | 53 // Called when a page is loaded using loadWithParams. |
| 56 - (void)webDidUpdateSessionForLoadWithParams: | 54 - (void)webDidUpdateSessionForLoadWithParams: |
| 57 (const web::NavigationManager::WebLoadParams&)params | 55 (const web::NavigationManager::WebLoadParams&)params |
| 58 wasInitialNavigation:(BOOL)initialNavigation; | 56 wasInitialNavigation:(BOOL)initialNavigation; |
| 59 | 57 |
| 60 @optional | 58 @optional |
| 61 | 59 |
| 62 // Called to ask CRWWebDelegate if |CRWWebController| should open the given URL. | 60 // Called to ask CRWWebDelegate if |CRWWebController| should open the given URL. |
| 63 // CRWWebDelegate can intercept the request by returning NO and processing URL | 61 // CRWWebDelegate can intercept the request by returning NO and processing URL |
| 64 // in own way. | 62 // in own way. |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 // Called when a PassKit file is downloaded. |data| should be the data from a | 94 // Called when a PassKit file is downloaded. |data| should be the data from a |
| 97 // PassKit file, but this is not guaranteed, and the delegate is responsible for | 95 // PassKit file, but this is not guaranteed, and the delegate is responsible for |
| 98 // error handling non PassKit data using -[PKPass initWithData:error:]. If the | 96 // error handling non PassKit data using -[PKPass initWithData:error:]. If the |
| 99 // download does not successfully complete, |data| will be nil. | 97 // download does not successfully complete, |data| will be nil. |
| 100 - (void)webController:(CRWWebController*)webController | 98 - (void)webController:(CRWWebController*)webController |
| 101 didLoadPassKitObject:(NSData*)data; | 99 didLoadPassKitObject:(NSData*)data; |
| 102 | 100 |
| 103 @end | 101 @end |
| 104 | 102 |
| 105 #endif // IOS_WEB_PUBLIC_WEB_STATE_UI_CRW_WEB_DELEGATE_H_ | 103 #endif // IOS_WEB_PUBLIC_WEB_STATE_UI_CRW_WEB_DELEGATE_H_ |
| OLD | NEW |