• Joel Hockey's avatar
    Unify clipboard and dragdrop in data offer to use callbacks · a962190d
    Joel Hockey authored
    Change drag and drop to also use callbacks for data fetching like how
    clipboard does. Ensure callbacks are only invoked once with data
    cached, and pending receive requests managed.
    
    Files drag and drop will require this to allow file sharing to be done
    inside FileHandler at the point where a client calls data_offer_receive,
    rather than when FileHandler is currently invoked when data is offered.
    
    This change provides performance improvements particularly for when an
    image is requested multiple times from the clipboard since we now only
    do the encoding once.
    
    Bug: 1144138
    Change-Id: I56c7d3b55a3365a591829313462af23e71e172b2
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2509833Reviewed-by: default avatarMitsuru Oshima <oshima@chromium.org>
    Commit-Queue: Joel Hockey <joelhockey@chromium.org>
    Auto-Submit: Joel Hockey <joelhockey@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#824129}
    a962190d
data_offer.h 4.82 KB