• Joel Hockey's avatar
    Implement X11 clipboard for ozone x11 · 31fc62a9
    Joel Hockey authored
    Supports only CLIPBOARD selection and not PRIMARY (for now) since
    ozone only supports a single clipboard.
    
    Regisers to receive XFixesSetSelectionOwnerNotify events and
    prefetches and caches supported mime types whenever ownership
    changes.  Also prefetches clipboard contents as 'text/plain'
    since that is the most likely type to be requested.  If clients
    request a different type, it will be fetched at the time of
    requesting.
    
    Converts text/plain[;charset=utf-8] <=> [UTF8_]STRING to
    allow interoperability with other applications which do not
    use the same mime types as chrome.
    
    This code can be patched into linux-chromeos (chrome os running
    on a linux desktop) by modifying the build file:
     sed -i s/is_desktop_linux/is_linux/ ui/base/clipboard/BUILD.gn
    
    Bug: 985187
    Change-Id: I4277f903ab8f11e0f5ad14d095eb099cf775f771
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1736619Reviewed-by: default avatarkylechar <kylechar@chromium.org>
    Commit-Queue: Joel Hockey <joelhockey@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#691892}
    31fc62a9
x11_clipboard_ozone.cc 12.3 KB