| 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 - (void)webCancelStartLoadingRequest; | 46 - (void)webCancelStartLoadingRequest; |
| 47 // Called when the page URL has changed. Phase will be PAGE_LOADING. Can be | 47 // Called when the page URL has changed. Phase will be PAGE_LOADING. Can be |
| 48 // followed by webDidFinishWithURL or webWillStartLoadingURL. | 48 // followed by webDidFinishWithURL or webWillStartLoadingURL. |
| 49 // |updateHistory| is YES if the URL should be added to the history DB. | 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|. | 50 // TODO(crbug.com/692331): Remove this method and use |DidFinishNavigation|. |
| 51 - (void)webDidStartLoadingURL:(const GURL&)url | 51 - (void)webDidStartLoadingURL:(const GURL&)url |
| 52 shouldUpdateHistory:(BOOL)updateHistory; | 52 shouldUpdateHistory:(BOOL)updateHistory; |
| 53 // Called when the page load was cancelled by page activity (before a success / | 53 // Called when the page load was cancelled by page activity (before a success / |
| 54 // failure state is known). Phase will be PAGE_LOADED. | 54 // failure state is known). Phase will be PAGE_LOADED. |
| 55 - (void)webLoadCancelled:(const GURL&)url; | 55 - (void)webLoadCancelled:(const GURL&)url; |
| 56 // Called when a page updates its history stack using pushState or replaceState. | |
| 57 // TODO(crbug.com/692331): Remove this method and use |DidFinishNavigation|. | |
| 58 - (void)webDidUpdateHistoryStateWithPageURL:(const GURL&)pageUrl; | |
| 59 // Called when a placeholder image should be displayed instead of the WebView. | 56 // Called when a placeholder image should be displayed instead of the WebView. |
| 60 - (void)webController:(CRWWebController*)webController | 57 - (void)webController:(CRWWebController*)webController |
| 61 retrievePlaceholderOverlayImage:(void (^)(UIImage*))block; | 58 retrievePlaceholderOverlayImage:(void (^)(UIImage*))block; |
| 62 | 59 |
| 63 // --------------------------------------------------------------------- | 60 // --------------------------------------------------------------------- |
| 64 // TODO(rohitrao): Eliminate as many of the following delegate methods as | 61 // TODO(rohitrao): Eliminate as many of the following delegate methods as |
| 65 // possible. They only exist because the Tab and CRWWebController logic was | 62 // possible. They only exist because the Tab and CRWWebController logic was |
| 66 // very intertwined. We should streamline the logic to jump between classes | 63 // very intertwined. We should streamline the logic to jump between classes |
| 67 // less, then remove any delegate method that becomes unneccessary as a result. | 64 // less, then remove any delegate method that becomes unneccessary as a result. |
| 68 | 65 |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 // Called when a PassKit file is downloaded. |data| should be the data from a | 145 // Called when a PassKit file is downloaded. |data| should be the data from a |
| 149 // PassKit file, but this is not guaranteed, and the delegate is responsible for | 146 // PassKit file, but this is not guaranteed, and the delegate is responsible for |
| 150 // error handling non PassKit data using -[PKPass initWithData:error:]. If the | 147 // error handling non PassKit data using -[PKPass initWithData:error:]. If the |
| 151 // download does not successfully complete, |data| will be nil. | 148 // download does not successfully complete, |data| will be nil. |
| 152 - (void)webController:(CRWWebController*)webController | 149 - (void)webController:(CRWWebController*)webController |
| 153 didLoadPassKitObject:(NSData*)data; | 150 didLoadPassKitObject:(NSData*)data; |
| 154 | 151 |
| 155 @end | 152 @end |
| 156 | 153 |
| 157 #endif // IOS_WEB_PUBLIC_WEB_STATE_UI_CRW_WEB_DELEGATE_H_ | 154 #endif // IOS_WEB_PUBLIC_WEB_STATE_UI_CRW_WEB_DELEGATE_H_ |
| OLD | NEW |