OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_CRW_WEB_USER_INTERFACE_DELEGATE_H_ | 5 #ifndef IOS_WEB_PUBLIC_WEB_STATE_CRW_WEB_USER_INTERFACE_DELEGATE_H_ |
6 #define IOS_WEB_PUBLIC_WEB_STATE_CRW_WEB_USER_INTERFACE_DELEGATE_H_ | 6 #define IOS_WEB_PUBLIC_WEB_STATE_CRW_WEB_USER_INTERFACE_DELEGATE_H_ |
7 | 7 |
8 #include <Foundation/Foundation.h> | 8 #include <Foundation/Foundation.h> |
9 | 9 |
10 @class CRWWebController; | 10 @class CRWWebController; |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 // text. If the cancel but is pressed, |input| will be nil. If this selector | 42 // text. If the cancel but is pressed, |input| will be nil. If this selector |
43 // isn't implemented, the completion handler provided by the web view will be | 43 // isn't implemented, the completion handler provided by the web view will be |
44 // called with |input| = nil. | 44 // called with |input| = nil. |
45 - (void)webController:(CRWWebController*)webController | 45 - (void)webController:(CRWWebController*)webController |
46 runJavaScriptTextInputPanelWithPrompt:(NSString*)message | 46 runJavaScriptTextInputPanelWithPrompt:(NSString*)message |
47 defaultText:(NSString*)defaultText | 47 defaultText:(NSString*)defaultText |
48 requestURL:(const GURL&)requestURL | 48 requestURL:(const GURL&)requestURL |
49 completionHandler: | 49 completionHandler: |
50 (void (^)(NSString* input))completionHandler; | 50 (void (^)(NSString* input))completionHandler; |
51 | 51 |
| 52 // Cancels any outstanding JavaScript dialogs requested by the functions above. |
| 53 - (void)cancelJavaScriptDialogsForWebController: |
| 54 (CRWWebController*)webController; |
| 55 |
52 // Displays a context menu for DOM element. |point| and |view| represent the | 56 // Displays a context menu for DOM element. |point| and |view| represent the |
53 // location and UIView where the context menu was triggered by a user gesture. | 57 // location and UIView where the context menu was triggered by a user gesture. |
54 // |menuInfo| keys are defined in crw_context_menu_provider.h. | 58 // |menuInfo| keys are defined in crw_context_menu_provider.h. |
55 // TODO(eugenebut): create DOMElement class (tag + attributes) and pass | 59 // TODO(eugenebut): create DOMElement class (tag + attributes) and pass |
56 // it and referrer as separate arguments instead of |menuInfo|. | 60 // it and referrer as separate arguments instead of |menuInfo|. |
57 - (void)webController:(CRWWebController*)webController | 61 - (void)webController:(CRWWebController*)webController |
58 runContextMenu:(NSDictionary*)menuInfo | 62 runContextMenu:(NSDictionary*)menuInfo |
59 atPoint:(CGPoint)point | 63 atPoint:(CGPoint)point |
60 inView:(UIView*)view; | 64 inView:(UIView*)view; |
61 | 65 |
62 @end | 66 @end |
63 | 67 |
64 #endif // IOS_WEB_PUBLIC_WEB_STATE_CRW_WEB_USER_INTERFACE_DELEGATE_H_ | 68 #endif // IOS_WEB_PUBLIC_WEB_STATE_CRW_WEB_USER_INTERFACE_DELEGATE_H_ |
OLD | NEW |