• Xiaoqian Dai's avatar
    Clamshell <-> tablet mode transition · 87d6424d
    Xiaoqian Dai authored
    There are 3 cases in clamshell to tablet mode transition:
    1) overview is active but splitview is not: keep overview active during
       transition.
    2) overview and splitview are both active: keep them both active during
       transition.
    3) overview and splitview are both inactive: keep the current behavior.
       a) if the top window is a snapped window, put it in splitview
       b) if the second top window is also a snapped window that snaps to the
          opposite side of the screen, put it in splitview as well
       c) if the top window is not a snapped window, maximize or fullscreen
          all windows when entering tablet mode.
    
    There are 4 cases in tablet to clamshell mode transition:
    1) overview is active but splitview is not: keep overview active during
       transition.
    2) overview and splitview are both active: keep them both active during
       transition.
    3) overview is inactive but splitview is active (i.e., two snapped windows),
       splitview will be no longer active after transition. But the two snapped
       window will still keep snapped in clamshell mode.
    4) overview and splitview are both inactive: keep the current behavior,
       i.e., restore all windows to its old window state before entering tablet
       mode.
    
    
    Bug: 890029
    Change-Id: I7769021f74c3e9d591b19258be2821992d780451
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1658955
    Commit-Queue: Xiaoqian Dai <xdai@chromium.org>
    Reviewed-by: default avatarMitsuru Oshima <oshima@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#670678}
    87d6424d
tablet_mode_window_state.cc 19.2 KB