• Antonio Gomes's avatar
    Remove WebCanvasCaptureHandler · 41ea1468
    Antonio Gomes authored
    This is a follow up of [1]. Basically, WebCanvasCaptureHandler is now
    only referenced within Blink, with its use is scattered between
    renderer/modules/ and renderer/core/html/canvas.
    
    For the of later, we can not simple replace the existing uses of
    WebCanvasCaptureHandler in CanvasDrawListener by CanvasCaptureHandler
    because renderer/core/html/canvas can not include renderer/modules/.
    
    As per haraken's advice in [2], this CL makes CanvasDrawListener
    pure virtual, and implements the methods as needed in
    modules/mediacapturefromelement:
    
    - AutoCanvasDrawListener: has the base implementation of the 3 method
      that used to live in html/canvas/CanvasDrawListener.
    
    - OnRequestCanvasDrawListener: inherits from AutoCanvasDrawListener and
    reimplements SendNewFrame.
    
    - TimedCanvasDrawListener: inherits from OnRequestCanvasDrawListener
    (but does not override any method).
    
    This allows us not to duplicate any code among these 3 classes,
    and eliminate WebCanvasCaptureHandler altogether.
    
    [1] https://crrev.com/c/1600898 (Onion soup canvas_capture_handler.cc/h)
    [2] https://crrev.com/c/1600898/1//COMMIT_MSG#34
    
    BUG=787261,919392
    
    Change-Id: I88113cc9cfe38a453ac028528f34eaea3448ea2e
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1603722Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
    Reviewed-by: default avatarGuido Urdaneta <guidou@chromium.org>
    Commit-Queue: Antonio Gomes <tonikitoo@igalia.com>
    Cr-Commit-Position: refs/heads/master@{#658944}
    41ea1468
BUILD.gn 74 KB