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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 // to track if this call was a result of user action or not. Returns YES iff | 54 // to track if this call was a result of user action or not. Returns YES iff |
55 // |URL| is launched in an external app. | 55 // |URL| is launched in an external app. |
56 - (BOOL)openExternalURL:(const GURL&)URL linkClicked:(BOOL)linkClicked; | 56 - (BOOL)openExternalURL:(const GURL&)URL linkClicked:(BOOL)linkClicked; |
57 | 57 |
58 // This method is invoked whenever the system believes the URL is about to | 58 // This method is invoked whenever the system believes the URL is about to |
59 // change, or immediately after any unexpected change of the URL, prior to | 59 // change, or immediately after any unexpected change of the URL, prior to |
60 // updating the navigation manager's pending entry. | 60 // updating the navigation manager's pending entry. |
61 // Phase will be LOAD_REQUESTED. | 61 // Phase will be LOAD_REQUESTED. |
62 - (void)webWillAddPendingURL:(const GURL&)url | 62 - (void)webWillAddPendingURL:(const GURL&)url |
63 transition:(ui::PageTransition)transition; | 63 transition:(ui::PageTransition)transition; |
64 // This method is invoked after an update to the navigation manager's pending | |
65 // URL, triggered whenever the system believes the URL is about to | |
66 // change, or immediately after any unexpected change of the URL. | |
67 // This can be followed by a call to webDidStartLoading (phase PAGE_LOADING) or | |
68 // another call to webWillAddPendingURL and webDidAddPendingURL (phase still | |
69 // LOAD_REQUESTED). | |
70 - (void)webDidAddPendingURL; | |
71 // Called when webWillStartLoadingURL was called, but something went wrong, and | 64 // Called when webWillStartLoadingURL was called, but something went wrong, and |
72 // webDidStartLoadingURL will now never be called. | 65 // webDidStartLoadingURL will now never be called. |
73 - (void)webCancelStartLoadingRequest; | 66 - (void)webCancelStartLoadingRequest; |
74 // Called when the page URL has changed. Phase will be PAGE_LOADING. Can be | 67 // Called when the page URL has changed. Phase will be PAGE_LOADING. Can be |
75 // followed by webDidFinishWithURL or webWillStartLoadingURL. | 68 // followed by webDidFinishWithURL or webWillStartLoadingURL. |
76 // |updateHistory| is YES if the URL should be added to the history DB. | 69 // |updateHistory| is YES if the URL should be added to the history DB. |
77 // TODO(stuartmorgan): Remove or rename the history param; the history DB | 70 // TODO(stuartmorgan): Remove or rename the history param; the history DB |
78 // isn't a web concept, so this shoud be expressed differently. | 71 // isn't a web concept, so this shoud be expressed differently. |
79 - (void)webDidStartLoadingURL:(const GURL&)url | 72 - (void)webDidStartLoadingURL:(const GURL&)url |
80 shouldUpdateHistory:(BOOL)updateHistory; | 73 shouldUpdateHistory:(BOOL)updateHistory; |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
193 // Called when a PassKit file is downloaded. |data| should be the data from a | 186 // Called when a PassKit file is downloaded. |data| should be the data from a |
194 // PassKit file, but this is not guaranteed, and the delegate is responsible for | 187 // PassKit file, but this is not guaranteed, and the delegate is responsible for |
195 // error handling non PassKit data using -[PKPass initWithData:error:]. If the | 188 // error handling non PassKit data using -[PKPass initWithData:error:]. If the |
196 // download does not successfully complete, |data| will be nil. | 189 // download does not successfully complete, |data| will be nil. |
197 - (void)webController:(CRWWebController*)webController | 190 - (void)webController:(CRWWebController*)webController |
198 didLoadPassKitObject:(NSData*)data; | 191 didLoadPassKitObject:(NSData*)data; |
199 | 192 |
200 @end | 193 @end |
201 | 194 |
202 #endif // IOS_WEB_PUBLIC_WEB_STATE_UI_CRW_WEB_DELEGATE_H_ | 195 #endif // IOS_WEB_PUBLIC_WEB_STATE_UI_CRW_WEB_DELEGATE_H_ |
OLD | NEW |