• Gyuyoung Kim's avatar
    Support set_disconnect_handler in mojo::SharedRemote · 9f1c5835
    Gyuyoung Kim authored
    There is a case that SharedRemote needs to support a disconnect callback
    in order to convert ThreadSafeInterface to SharedRemote. So, this CL
    adds set_disconnect_handler to SharedRemote with a test case.
    
    Additionally, this CL makes the constructor and Create() factory
    functions private in SharedRemoteBase class. Because SharedRemoteBase
    needs to have RemoteWrapper as a member variable to call
    set_disconnect_handler().
    
    TEST: RemoteTest.SharedRemoteDisconnectCallback
    Bug: 955171
    Change-Id: I5131c9947491094fbb0c00bbb733fd3dcbbf1b88
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1947517
    Commit-Queue: Gyuyoung Kim <gyuyoung@igalia.com>
    Reviewed-by: default avatarKen Rockot <rockot@google.com>
    Cr-Commit-Position: refs/heads/master@{#721394}
    9f1c5835
remote_unittest.cc 33.5 KB