• imcheng's avatar
    Reland of: [Presentation API] Implement ondefaultsessionstart in PSImpl. · 2ed5f820
    imcheng authored
    To fix PresentationServiceImplTest.DefaultSessionStartReset timeout
    in  Android Tests (dbg).
    
    TEST=git cl try + linux_android_dbg_ng
    ----
    
    Added DefaultSessionStartContext for coordinating sending default
    session back to PresentationDispatcher.
    
    When ListenForDefaultSessionStart is called, DefaultSessionStartContext
    will be installed on PresentationServiceImpl. When both the default
    session and PresentationDispatcher's callback are available, the
    callback will be invoked with the session.
    
    On Reset(), if a callback is available, it will be invoked with null.
    Changed PresentationDispatcher to not update Blink in that case.
    
    Also, PSImpl now keeps track of the corresponding RFH's ID instead of
    RFH* since most of the time we only need to use the ID.
    
    Changed PresentationServiceDelegate's Add/RemoveObserver interface,
    since the PresentationServiceDelegate need to be able to correlate
    an Observer with a RFH. (at most 1 per RFH, as it stands today).
    
    Added OnDefaultPresentationStarted to
    PresentationServiceDelegate::Observer interface and implemented it
    in PresentationServiceImpl.
    
    Added tests in PresentationServiceImpl.
    
    BUG=459001
    
    Review URL: https://codereview.chromium.org/1055053004
    
    Cr-Commit-Position: refs/heads/master@{#326859}
    2ed5f820
presentation_service.mojom 3.55 KB