Chromium Code Reviews| Index: ash/wm/lock_window_state.h |
| diff --git a/ash/wm/lock_window_state.h b/ash/wm/lock_window_state.h |
| index 71de81bd984fd2a13024d25411c107e297ee6852..6f961c9b9dff2a90432963b47664a7b0f5407d8a 100644 |
| --- a/ash/wm/lock_window_state.h |
| +++ b/ash/wm/lock_window_state.h |
| @@ -12,13 +12,19 @@ namespace ash { |
| // The LockWindowState implementation which reduces all possible window |
| // states to maximized (or normal if can't be maximized)/minimized/full-screen |
| -// and is applied only on lock (login) window container. |
| +// and is applied only on lock (login) window container and window containers |
| +// associated with apps handling lock screen tray actions. |
| // LockWindowState implements Ash behavior without state machine. |
| class LockWindowState : public wm::WindowState::State { |
| public: |
| // The |window|'s state object will be modified to use this new window mode |
| // state handler. |
| - explicit LockWindowState(aura::Window* window); |
| + // |shelf_visible| - if set, the maximized window size will be |
| + // restricted to work area defined by ash shelf, rather than taking only |
| + // virtual keyboard window into consideration when calculating the window |
| + // size. |
| + LockWindowState(aura::Window* window, bool shelf_visible); |
| + |
| ~LockWindowState() override; |
| // WindowState::State overrides: |
| @@ -31,6 +37,8 @@ class LockWindowState : public wm::WindowState::State { |
| // Creates new LockWindowState instance and attaches it to |window|. |
| static wm::WindowState* SetLockWindowState(aura::Window* window); |
| + static wm::WindowState* SetLockWindowStateWithVisibleShelf( |
| + aura::Window* window); |
| private: |
| // Updates the window to |new_state_type| and resulting bounds: |
| @@ -44,6 +52,9 @@ class LockWindowState : public wm::WindowState::State { |
| wm::WindowStateType GetMaximizedOrCenteredWindowType( |
| wm::WindowState* window_state); |
| + // Returns boudns to be used for the provided window. |
| + gfx::Rect GetWindowBounds(aura::Window* window); |
| + |
| // Updates the bounds taking virtual keyboard bounds into consideration. |
| void UpdateBounds(wm::WindowState* window_state); |
| @@ -51,6 +62,9 @@ class LockWindowState : public wm::WindowState::State { |
| // WM_STATE_TYPE{NORMAL, MINIMIZED, MAXIMIZED}. |
| wm::WindowStateType current_state_type_; |
| + // Restrict window size to the work area defined by the shelf. |
| + bool shelf_visible_ = false; |
|
oshima
2017/05/25 19:49:59
exclude_shelf_ ? (I believe the shelf is *visible*
tbarzic
2017/05/25 20:32:20
Done.
|
| + |
| DISALLOW_COPY_AND_ASSIGN(LockWindowState); |
| }; |