• Devlin Cronin's avatar
    [Extensions Bindings] Add a OneTimeMessagingHandler · 0b875676
    Devlin Cronin authored
    Add a OneTimeMessagingHandler to handle sending one-time messages (such
    as those from chrome.runtime.sendMessage) with native bindings. These
    messages open a message channel, similar to the long-lived connections
    of chrome.runtime.connect(), but the channel is only open for a single
    message-and-response cycle.
    
    The OneTimeMessagingHandler is responsible for creating and maintaining
    these message channels, and cleaning them up when complete.
    
    Add tests for the same.
    
    Note: currently, these constructs are still only used in tests. A later
    CL will hook them up to the bindings system.
    
    Bug: 653596
    Change-Id: Ibeae3bda73b66306a85b13749f1cab1a1edfb33b
    Reviewed-on: https://chromium-review.googlesource.com/675305
    Commit-Queue: Devlin <rdevlin.cronin@chromium.org>
    Reviewed-by: default avatarIstiaque Ahmed <lazyboy@chromium.org>
    Reviewed-by: default avatarJeremy Roman <jbroman@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#506932}
    0b875676
native_renderer_messaging_service.cc 12.8 KB