| 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 22 matching lines...) Expand all Loading... |
| 33 // to track if this call was a result of user action or not. Returns YES iff | 33 // to track if this call was a result of user action or not. Returns YES iff |
| 34 // |URL| is launched in an external app. | 34 // |URL| is launched in an external app. |
| 35 - (BOOL)openExternalURL:(const GURL&)URL linkClicked:(BOOL)linkClicked; | 35 - (BOOL)openExternalURL:(const GURL&)URL linkClicked:(BOOL)linkClicked; |
| 36 | 36 |
| 37 // This method is invoked whenever the system believes the URL is about to | 37 // This method is invoked whenever the system believes the URL is about to |
| 38 // change, or immediately after any unexpected change of the URL, prior to | 38 // change, or immediately after any unexpected change of the URL, prior to |
| 39 // updating the navigation manager's pending entry. | 39 // updating the navigation manager's pending entry. |
| 40 // Phase will be LOAD_REQUESTED. | 40 // Phase will be LOAD_REQUESTED. |
| 41 - (void)webWillAddPendingURL:(const GURL&)url | 41 - (void)webWillAddPendingURL:(const GURL&)url |
| 42 transition:(ui::PageTransition)transition; | 42 transition:(ui::PageTransition)transition; |
| 43 // Called when webWillStartLoadingURL was called, but something went wrong. | |
| 44 - (void)webCancelStartLoadingRequest; | |
| 45 // Called when the page load was cancelled by page activity (before a success / | |
| 46 // failure state is known). Phase will be PAGE_LOADED. | |
| 47 - (void)webLoadCancelled:(const GURL&)url; | |
| 48 // 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. |
| 49 - (void)webController:(CRWWebController*)webController | 44 - (void)webController:(CRWWebController*)webController |
| 50 retrievePlaceholderOverlayImage:(void (^)(UIImage*))block; | 45 retrievePlaceholderOverlayImage:(void (^)(UIImage*))block; |
| 51 | 46 |
| 52 // --------------------------------------------------------------------- | 47 // --------------------------------------------------------------------- |
| 53 // TODO(rohitrao): Eliminate as many of the following delegate methods as | 48 // TODO(rohitrao): Eliminate as many of the following delegate methods as |
| 54 // possible. They only exist because the Tab and CRWWebController logic was | 49 // possible. They only exist because the Tab and CRWWebController logic was |
| 55 // very intertwined. We should streamline the logic to jump between classes | 50 // very intertwined. We should streamline the logic to jump between classes |
| 56 // 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. |
| 57 | 52 |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 // Called when a PassKit file is downloaded. |data| should be the data from a | 117 // Called when a PassKit file is downloaded. |data| should be the data from a |
| 123 // PassKit file, but this is not guaranteed, and the delegate is responsible for | 118 // PassKit file, but this is not guaranteed, and the delegate is responsible for |
| 124 // error handling non PassKit data using -[PKPass initWithData:error:]. If the | 119 // error handling non PassKit data using -[PKPass initWithData:error:]. If the |
| 125 // download does not successfully complete, |data| will be nil. | 120 // download does not successfully complete, |data| will be nil. |
| 126 - (void)webController:(CRWWebController*)webController | 121 - (void)webController:(CRWWebController*)webController |
| 127 didLoadPassKitObject:(NSData*)data; | 122 didLoadPassKitObject:(NSData*)data; |
| 128 | 123 |
| 129 @end | 124 @end |
| 130 | 125 |
| 131 #endif // IOS_WEB_PUBLIC_WEB_STATE_UI_CRW_WEB_DELEGATE_H_ | 126 #endif // IOS_WEB_PUBLIC_WEB_STATE_UI_CRW_WEB_DELEGATE_H_ |
| OLD | NEW |