OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef IOS_WEB_PUBLIC_WEB_STATE_UI_CRW_CONTEXT_MENU_DELEGATE_H_ | |
6 #define IOS_WEB_PUBLIC_WEB_STATE_UI_CRW_CONTEXT_MENU_DELEGATE_H_ | |
7 | |
8 #import <WebKit/WebKit.h> | |
9 | |
10 #import "ios/web/public/web_state/context_menu_params.h" | |
11 | |
12 // Implement this protocol to listen to the custom context menu trigger from | |
13 // WKWebView. | |
14 @protocol CRWContextMenuDelegate | |
15 // Called when the custom Context menu recognizer triggers on |webView|. | |
16 // - triggered on a long press gesture, slightly shorter than the default | |
17 // context menu recognizer. | |
18 // - if result is YES, the system context meny will be suppressed. | |
19 // YES must be returned within 0.05 second. | |
Eugene But (OOO till 7-30)
2017/01/13 18:23:42
Is it a requirement to return YES in 0.05 seconds?
Olivier
2017/01/13 18:49:55
At least if you spin the runloop, it will be a pro
Eugene But (OOO till 7-30)
2017/01/13 19:00:32
Thanks! So should this comment be "YES must be ret
Olivier
2017/01/16 08:31:05
Done.
| |
20 // - if result is NO, the system context meny will be displayed. | |
Eugene But (OOO till 7-30)
2017/01/13 18:23:42
s/meny/menu
Olivier
2017/01/13 18:49:55
Done.
| |
21 // - Client can return YES without showing any UI to cancel the system context | |
22 // menu. | |
Eugene But (OOO till 7-30)
2017/01/13 18:23:42
Please also document that method is not called if
Olivier
2017/01/13 18:49:55
Done.
| |
23 - (BOOL)webView:(WKWebView*)webView | |
24 handleContextMenu:(const web::ContextMenuParams&)params; | |
25 @end | |
26 | |
27 #endif // IOS_WEB_PUBLIC_WEB_STATE_UI_CRW_CONTEXT_MENU_DELEGATE_H_ | |
OLD | NEW |