• wjmaclean's avatar
    Simplify ZoomController by removing DefaultZoomLevel prefs machinery. · 32a991c9
    wjmaclean authored
    In preparation for moving to multiple HostZoomMaps (one-per
    StoragePartition), it is helpful to simplify ZoomController by removing
    the prefs machinery for DefaultZoomLevel, and instead rely on getting
    this value from the HostZoomMap.
    
    The calls to ZoomController::UpdateState() that used to be triggered
    directly by the prefs changes still occur, though by a roundtrip from
    PrefsTabHelper via IPC to RenderViewImpl and then by IPC back to
    the HostZoomMap, which in turn notifies its observers. This only happens
    in cases where the change in DefaultZoomLevel actually causes the
    RenderViewImpl to change its zoom, so it is a subtle change in behaviour
    from before.
    
    BUG=335317
    
    Review URL: https://codereview.chromium.org/508263002
    
    Cr-Commit-Position: refs/heads/master@{#292920}
    32a991c9
zoom_controller_unittest.cc 3.85 KB