| 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 23 matching lines...) Expand all Loading... |
| 34 // to track if this call was a result of user action or not. Returns YES iff | 34 // to track if this call was a result of user action or not. Returns YES iff |
| 35 // |URL| is launched in an external app. | 35 // |URL| is launched in an external app. |
| 36 - (BOOL)openExternalURL:(const GURL&)URL linkClicked:(BOOL)linkClicked; | 36 - (BOOL)openExternalURL:(const GURL&)URL linkClicked:(BOOL)linkClicked; |
| 37 | 37 |
| 38 // This method is invoked whenever the system believes the URL is about to | 38 // This method is invoked whenever the system believes the URL is about to |
| 39 // change, or immediately after any unexpected change of the URL, prior to | 39 // change, or immediately after any unexpected change of the URL, prior to |
| 40 // updating the navigation manager's pending entry. | 40 // updating the navigation manager's pending entry. |
| 41 // Phase will be LOAD_REQUESTED. | 41 // Phase will be LOAD_REQUESTED. |
| 42 - (void)webWillAddPendingURL:(const GURL&)url | 42 - (void)webWillAddPendingURL:(const GURL&)url |
| 43 transition:(ui::PageTransition)transition; | 43 transition:(ui::PageTransition)transition; |
| 44 // Called when webWillStartLoadingURL was called, but something went wrong, and | 44 // Called when webWillStartLoadingURL was called, but something went wrong. |
| 45 // webDidStartLoadingURL will now never be called. | |
| 46 - (void)webCancelStartLoadingRequest; | 45 - (void)webCancelStartLoadingRequest; |
| 47 // Called when the page URL has changed. Phase will be PAGE_LOADING. Can be | |
| 48 // followed by webDidFinishWithURL or webWillStartLoadingURL. | |
| 49 // |updateHistory| is YES if the URL should be added to the history DB. | |
| 50 // TODO(crbug.com/692331): Remove this method and use |DidFinishNavigation|. | |
| 51 - (void)webDidStartLoadingURL:(const GURL&)url | |
| 52 shouldUpdateHistory:(BOOL)updateHistory; | |
| 53 // Called when the page load was cancelled by page activity (before a success / | 46 // Called when the page load was cancelled by page activity (before a success / |
| 54 // failure state is known). Phase will be PAGE_LOADED. | 47 // failure state is known). Phase will be PAGE_LOADED. |
| 55 - (void)webLoadCancelled:(const GURL&)url; | 48 - (void)webLoadCancelled:(const GURL&)url; |
| 56 // Called when a placeholder image should be displayed instead of the WebView. | 49 // Called when a placeholder image should be displayed instead of the WebView. |
| 57 - (void)webController:(CRWWebController*)webController | 50 - (void)webController:(CRWWebController*)webController |
| 58 retrievePlaceholderOverlayImage:(void (^)(UIImage*))block; | 51 retrievePlaceholderOverlayImage:(void (^)(UIImage*))block; |
| 59 | 52 |
| 60 // --------------------------------------------------------------------- | 53 // --------------------------------------------------------------------- |
| 61 // TODO(rohitrao): Eliminate as many of the following delegate methods as | 54 // TODO(rohitrao): Eliminate as many of the following delegate methods as |
| 62 // possible. They only exist because the Tab and CRWWebController logic was | 55 // possible. They only exist because the Tab and CRWWebController logic was |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 // Called when a PassKit file is downloaded. |data| should be the data from a | 134 // Called when a PassKit file is downloaded. |data| should be the data from a |
| 142 // PassKit file, but this is not guaranteed, and the delegate is responsible for | 135 // PassKit file, but this is not guaranteed, and the delegate is responsible for |
| 143 // error handling non PassKit data using -[PKPass initWithData:error:]. If the | 136 // error handling non PassKit data using -[PKPass initWithData:error:]. If the |
| 144 // download does not successfully complete, |data| will be nil. | 137 // download does not successfully complete, |data| will be nil. |
| 145 - (void)webController:(CRWWebController*)webController | 138 - (void)webController:(CRWWebController*)webController |
| 146 didLoadPassKitObject:(NSData*)data; | 139 didLoadPassKitObject:(NSData*)data; |
| 147 | 140 |
| 148 @end | 141 @end |
| 149 | 142 |
| 150 #endif // IOS_WEB_PUBLIC_WEB_STATE_UI_CRW_WEB_DELEGATE_H_ | 143 #endif // IOS_WEB_PUBLIC_WEB_STATE_UI_CRW_WEB_DELEGATE_H_ |
| OLD | NEW |