Skip to content
  • tguilbert's avatar
    Add RendererFactorySelector · 70d2a00a
    tguilbert authored
    There are 4 types of renderers that are used by WMPI directly, with a
    potential fifth type in the works. Currently, a single RendererFactory
    is chosen at WMPI creation time, and bound for the lifetime of WMPI.
    However, there is a growing need to allow the smooth transition between
    the use of different renderer types, after WMPI’s creation.
    
    This CL introduces the RendererFactorySelector, which will allow us to
    choose between different RendererFactory types at runtime. Its purpose
    is to aggregate the signals and centralize the logic necessary to choose
    which RendererFactory should be used when creating a new Renderer.
    
    The interface is still extremelly simple, but it is expected to grow
    as the number of concurrent RendererFactory types grows. In other words,
    if there are 3+ renderer factories at play, some complexity is
    inevitable, and the right place for that complexity to live is in the
    RendererFactorySelector.
    
    NOTE: The RendererFactorySelector uses a FactoryType enum as a key, in
    order to avoid having to take dependencies on different (sometimes
    platform specific) RendererFactories.
    
    BUG=663503
    
    Review-Url: https://codereview.chromium.org/2711153006
    Cr-Commit-Position: refs/heads/master@{#466837}
    70d2a00a