Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(129)

Unified Diff: ash/wm/lock_window_state.h

Issue 2876993002: Introduce window container to be used by lock screen app windows (Closed)
Patch Set: . Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/wm/lock_layout_manager.h ('k') | ash/wm/lock_window_state.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..ec4cd2340bbc18be439863887cd75415ba72efb3 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);
+ // |exclude_shelf| - 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 exclude_shelf);
+
~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* SetLockWindowStateWithShelfExcluded(
+ 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,10 @@ 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 - i.e. window
+ // bounds exclude system shelf bounds.
+ bool exclude_shelf_ = false;
+
DISALLOW_COPY_AND_ASSIGN(LockWindowState);
};
« no previous file with comments | « ash/wm/lock_layout_manager.h ('k') | ash/wm/lock_window_state.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698