| 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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 - (BOOL)webController:(CRWWebController*)webController | 65 - (BOOL)webController:(CRWWebController*)webController |
| 66 shouldOpenURL:(const GURL&)url | 66 shouldOpenURL:(const GURL&)url |
| 67 mainDocumentURL:(const GURL&)mainDocumentURL | 67 mainDocumentURL:(const GURL&)mainDocumentURL |
| 68 linkClicked:(BOOL)linkClicked; | 68 linkClicked:(BOOL)linkClicked; |
| 69 | 69 |
| 70 // Called to ask if external URL should be opened. External URL is one that | 70 // Called to ask if external URL should be opened. External URL is one that |
| 71 // cannot be presented by CRWWebController. | 71 // cannot be presented by CRWWebController. |
| 72 - (BOOL)webController:(CRWWebController*)webController | 72 - (BOOL)webController:(CRWWebController*)webController |
| 73 shouldOpenExternalURL:(const GURL&)URL; | 73 shouldOpenExternalURL:(const GURL&)URL; |
| 74 | 74 |
| 75 // Called when |URL| is deemed suitable to be opened in a matching native app. | |
| 76 // Needs to return whether |URL| was opened in a matching native app. | |
| 77 // Also triggering user action |linkClicked| is passed to use it when needed. | |
| 78 // The return value indicates if the native app was launched, not if a native | |
| 79 // app was found. | |
| 80 - (BOOL)urlTriggersNativeAppLaunch:(const GURL&)URL | |
| 81 sourceURL:(const GURL&)sourceURL | |
| 82 linkClicked:(BOOL)linkClicked; | |
| 83 | |
| 84 // Called to ask the delegate for a controller to display the given url, | 75 // Called to ask the delegate for a controller to display the given url, |
| 85 // which contained content that the UIWebView couldn't display. Returns | 76 // which contained content that the UIWebView couldn't display. Returns |
| 86 // the native controller to display if the delegate can handle the url, | 77 // the native controller to display if the delegate can handle the url, |
| 87 // or nil otherwise. | 78 // or nil otherwise. |
| 88 - (id<CRWNativeContent>)controllerForUnhandledContentAtURL:(const GURL&)url; | 79 - (id<CRWNativeContent>)controllerForUnhandledContentAtURL:(const GURL&)url; |
| 89 | 80 |
| 90 // Called to retrieve the height of any header that is overlaying on top of the | 81 // Called to retrieve the height of any header that is overlaying on top of the |
| 91 // web view. This can be used to implement, for e.g. a toolbar that changes | 82 // web view. This can be used to implement, for e.g. a toolbar that changes |
| 92 // height dynamically. Returning a non-zero height affects the visible frame | 83 // height dynamically. Returning a non-zero height affects the visible frame |
| 93 // shown by the CRWWebController. 0.0 is assumed if not implemented. | 84 // shown by the CRWWebController. 0.0 is assumed if not implemented. |
| 94 - (CGFloat)headerHeightForWebController:(CRWWebController*)webController; | 85 - (CGFloat)headerHeightForWebController:(CRWWebController*)webController; |
| 95 | 86 |
| 96 // Called when a PassKit file is downloaded. |data| should be the data from a | 87 // 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 | 88 // 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 | 89 // error handling non PassKit data using -[PKPass initWithData:error:]. If the |
| 99 // download does not successfully complete, |data| will be nil. | 90 // download does not successfully complete, |data| will be nil. |
| 100 - (void)webController:(CRWWebController*)webController | 91 - (void)webController:(CRWWebController*)webController |
| 101 didLoadPassKitObject:(NSData*)data; | 92 didLoadPassKitObject:(NSData*)data; |
| 102 | 93 |
| 103 @end | 94 @end |
| 104 | 95 |
| 105 #endif // IOS_WEB_PUBLIC_WEB_STATE_UI_CRW_WEB_DELEGATE_H_ | 96 #endif // IOS_WEB_PUBLIC_WEB_STATE_UI_CRW_WEB_DELEGATE_H_ |
| OLD | NEW |