Add support for Asynchronous Clipboard API
The Asynchronous Clipboard API was added in Chrome 66 for the reasons described here. It could be nice for CEF to support this API as a way for client applications to grant or deny clipboard read/write access on a per-origin basis. At the same time, we should provide a way to globally disable the old synchronous API while allowing the new asynchronous API (perhaps via the existing CefSettings.javascript_access_clipboard
and CefSettings.javascript_dom_paste
options).
Test URL: https://googlechrome.github.io/samples/async-clipboard/
Comments (3)
-
-
@wanghongliang I attempted to use this suggested fix rebased on to 4389. While I got it to compile, I don’t see any change in behavior. Has something changed between 3904 and 4389 that would require additional changes to get this to work?
Possibly related to chromiumembedded / cef / commit / 48fc0bd2206d — Bitbucket , trying to remove the AlloyBrowserContext::GetPermissionControllerDelegate
Edit: It appears to work if I change libcef/browser/alloy/alloy_browser_context.cc:
content::PermissionControllerDelegate*
AlloyBrowserContext::GetPermissionControllerDelegate() {
// return nullptr;
return CefBrowserContext::GetPermissionControllerDelegate();
} -
reporter - changed status to wontfix
This should currently work with the Chrome runtime. We will likely not support this with the Alloy runtime.
- Log in to comment
I have fixed in our project on branch 3904, implement content::PermissionControllerDelegate,I put CLIPBOARD_READ/CLIPBOARD_WRITE on the white list by default,these permissions are not authorized by the user. add
cef_permission_manager.h
/cef_permission_manager.cc
.it may be useful