• raymes@chromium.org's avatar
    Add GetScrollOffset function to PPB_View · 5015a072
    raymes@chromium.org authored
    This adds a function to PPB_View which allows plugins to know the scroll offset
    of the page when they are in view. This is useful for OOP PDF which uses the
    scroll offset of the window it is contained in to determine the document's
    scroll location. A web page can send scroll location via postMessage but
    this is slow. Sending the offset directly via view messages is much faster
    and seems reasonable.
    
    We don't send the scroll offset in the cases where the plugin is off screen
    to avoid any more additional IPC traffic than what currently exists.
    
    BUG=303491
    
    Review URL: https://codereview.chromium.org/329033003
    
    git-svn-id: svn://svn.chromium.org/chrome/trunk/src@278236 0039d316-1c4b-4281-b951-d872f2087c98
    5015a072
test_view.cc 8.03 KB