• Alex Zhang's avatar
    Do not remove entry from |frame_sink_source_map_| when client is unregistered. · 1c176482
    Alex Zhang authored
    Currently, FrameSinkManager::UnregisterFrameSinkManagerClient removes
    the entry associated with |frame_sink_id| from |frame_sink_source_map_|
    if the |frame_sink_id| does not have any children. This would result in
    a client not connected with a BeginFrameSource when it is unregistered
    and re-registered with the same FrameSinkId.
    
    This CL removes the lines that removes the entry from |frame_sink_source_map_|
    if the |frame_sink_id| has no child in
    FrameSinkManager::UnregisterFrameSinkManagerClient. It also adds a unit
    test to verify that the client gets reconnected to the BeginFrameSource
    after unregistering and re-registering.
    
    Bug: 735805
    Change-Id: I93ae860b1192e23aa116749d0bbcdb553ddc2246
    Reviewed-on: https://chromium-review.googlesource.com/563705
    Commit-Queue: Xingyu Zhang <staraz@chromium.org>
    Reviewed-by: default avatarFady Samuel <fsamuel@chromium.org>
    Reviewed-by: default avatarenne <enne@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#485172}
    1c176482
frame_sink_manager_unittest.cc 19 KB