• K Moon's avatar
    Pass PDF layout options through JavaScript · aa70882f
    K Moon authored
    Adds a "LayoutOptions" object that is passed from the PDF plugin (via
    the "documentDimensions" message), through the extension, and back to
    the plugin (via the "viewport" message).
    
    We plan to make layout asynchronous for crbug.com/885110. To accomplish
    this, we need to carry certain layout state through the JavaScript
    layer, until the layout change finally is applied.
    
    In the future, we may want to modify the layout options in JavaScript
    (such as for 2-up view), but for now, we just need to pass the exact
    same object back and forth.
    
    Bug: 885110
    Change-Id: Iaac57422dbba185399358ceffdbde4e6ad2c7899
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1815769
    Commit-Queue: K Moon <kmoon@chromium.org>
    Reviewed-by: default avatarRebekah Potter <rbpotter@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#700417}
    aa70882f
controller.js 13 KB