| Index: ash/wm/lock_window_state.h
|
| diff --git a/ash/wm/maximize_mode/maximize_mode_window_state.h b/ash/wm/lock_window_state.h
|
| similarity index 54%
|
| copy from ash/wm/maximize_mode/maximize_mode_window_state.h
|
| copy to ash/wm/lock_window_state.h
|
| index 093f46be0203ff2c303422a64e7b91376c77ea54..66dd26a485190b3ac96055807ae4a5c32c3da635 100644
|
| --- a/ash/wm/maximize_mode/maximize_mode_window_state.h
|
| +++ b/ash/wm/lock_window_state.h
|
| @@ -2,34 +2,29 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#ifndef ASH_WM_MAXIMIZE_MODE_MAXIMIZE_MODE_WINDOW_STATE_H_
|
| -#define ASH_WM_MAXIMIZE_MODE_MAXIMIZE_MODE_WINDOW_STATE_H_
|
| +#ifndef ASH_WM_LOCK_WINDOW_STATE_H_
|
| +#define ASH_WM_LOCK_WINDOW_STATE_H_
|
|
|
| #include "ash/wm/window_state.h"
|
|
|
| namespace ash {
|
| -class MaximizeModeWindowManager;
|
|
|
| -// The MaximizeModeWindowState implementation which reduces all possible window
|
| -// states to minimized and maximized. If a window cannot be maximized it will be
|
| -// set to normal. If a window cannot fill the entire workspace it will be
|
| -// centered within the workspace.
|
| -class MaximizeModeWindowState : public wm::WindowState::State {
|
| - public:
|
| - // Called when the window position might need to be updated.
|
| - static void UpdateWindowPosition(wm::WindowState* window_state,
|
| - bool animated);
|
| +class LockLayoutManager;
|
|
|
| +// The LockWindowState implementation which reduces all possible window
|
| +// states to maximized and is applied only on lock (login) window container.
|
| +// 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. Upon destruction it will restore the previous state handler
|
| // and call |creator::WindowStateDestroyed()| to inform that the window mode
|
| // was reverted to the old window manager.
|
| - MaximizeModeWindowState(aura::Window* window,
|
| - MaximizeModeWindowManager* creator);
|
| - virtual ~MaximizeModeWindowState();
|
| + LockWindowState(aura::Window* window, LockLayoutManager* creator);
|
| + virtual ~LockWindowState();
|
|
|
| - // Leaves the maximize mode by reverting to previous state object.
|
| - void LeaveMaximizeMode(wm::WindowState* window_state);
|
| + // Reverts to previous WindowState object.
|
| + void RestoreWindowState(wm::WindowState* window_state);
|
|
|
| // WindowState::State overrides:
|
| virtual void OnWMEvent(wm::WindowState* window_state,
|
| @@ -43,20 +38,17 @@ class MaximizeModeWindowState : public wm::WindowState::State {
|
| private:
|
| // Updates the window to |new_state_type| and resulting bounds:
|
| // Either full screen, maximized centered or minimized. If the state does not
|
| - // change, only the bounds will be changed. If |animate| is set, the bound
|
| - // change get animated.
|
| + // change, only the bounds will be changed.
|
| void UpdateWindow(wm::WindowState* window_state,
|
| - wm::WindowStateType new_state_type,
|
| - bool animate);
|
| + wm::WindowStateType new_state_type);
|
|
|
| // Depending on the capabilities of the window we either return
|
| // |WINDOW_STATE_TYPE_MAXIMIZED| or |WINDOW_STATE_TYPE_NORMAL|.
|
| wm::WindowStateType GetMaximizedOrCenteredWindowType(
|
| wm::WindowState* window_state);
|
|
|
| - // Updates the bounds to the maximum possible bounds according to the current
|
| - // window state. If |animated| is set we animate the change.
|
| - void UpdateBounds(wm::WindowState* window_state, bool animated);
|
| + // Updates the bounds taking virtual keyboard bounds into consideration.
|
| + void UpdateBounds(wm::WindowState* window_state);
|
|
|
| // The original state object of the window.
|
| scoped_ptr<wm::WindowState::State> old_state_;
|
| @@ -65,15 +57,15 @@ class MaximizeModeWindowState : public wm::WindowState::State {
|
| aura::Window* window_;
|
|
|
| // The creator which needs to be informed when this state goes away.
|
| - MaximizeModeWindowManager* creator_;
|
| + LockLayoutManager* creator_;
|
|
|
| // The current state type. Due to the nature of this state, this can only be
|
| // WM_STATE_TYPE{NORMAL, MINIMIZED, MAXIMIZED}.
|
| wm::WindowStateType current_state_type_;
|
|
|
| - DISALLOW_COPY_AND_ASSIGN(MaximizeModeWindowState);
|
| + DISALLOW_COPY_AND_ASSIGN(LockWindowState);
|
| };
|
|
|
| } // namespace ash
|
|
|
| -#endif // ASH_WM_MAXIMIZE_MODE_MAXIMIZE_MODE_WINDOW_STATE_H_
|
| +#endif // ASH_WM_LOCK_WINDOW_STATE_H_
|
|
|