OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef ASH_WM_LOCK_LAYOUT_MANAGER_H_ | 5 #ifndef ASH_WM_LOCK_LAYOUT_MANAGER_H_ |
6 #define ASH_WM_LOCK_LAYOUT_MANAGER_H_ | 6 #define ASH_WM_LOCK_LAYOUT_MANAGER_H_ |
7 | 7 |
8 #include "ash/ash_export.h" | 8 #include "ash/ash_export.h" |
9 #include "ash/shell_delegate.h" | 9 #include "ash/shell_delegate.h" |
| 10 #include "ash/snap_to_pixel_layout_manager.h" |
10 #include "ash/wm/wm_types.h" | 11 #include "ash/wm/wm_types.h" |
11 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
12 #include "base/compiler_specific.h" | 13 #include "base/compiler_specific.h" |
13 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
14 #include "ui/aura/layout_manager.h" | 15 #include "ui/aura/layout_manager.h" |
15 #include "ui/aura/window_observer.h" | 16 #include "ui/aura/window_observer.h" |
16 #include "ui/gfx/rect.h" | 17 #include "ui/gfx/rect.h" |
17 #include "ui/keyboard/keyboard_controller.h" | 18 #include "ui/keyboard/keyboard_controller.h" |
18 #include "ui/keyboard/keyboard_controller_observer.h" | 19 #include "ui/keyboard/keyboard_controller_observer.h" |
19 | 20 |
(...skipping 17 matching lines...) Expand all Loading... |
37 // cases. LockScreenContainer does not use default work area definition. | 38 // cases. LockScreenContainer does not use default work area definition. |
38 // By default work area is defined as display area minus shelf, docked windows | 39 // By default work area is defined as display area minus shelf, docked windows |
39 // and minus virtual keyboard bounds. | 40 // and minus virtual keyboard bounds. |
40 // For windows in LockScreenContainer work area is display area minus virtual | 41 // For windows in LockScreenContainer work area is display area minus virtual |
41 // keyboard bounds (only if keyboard overscroll is disabled). If keyboard | 42 // keyboard bounds (only if keyboard overscroll is disabled). If keyboard |
42 // overscroll is enabled then work area always equals to display area size since | 43 // overscroll is enabled then work area always equals to display area size since |
43 // virtual keyboard changes inner workspace of each WebContents. | 44 // virtual keyboard changes inner workspace of each WebContents. |
44 // For all windows in LockScreenContainer default wm::WindowState is replaced | 45 // For all windows in LockScreenContainer default wm::WindowState is replaced |
45 // with LockWindowState. | 46 // with LockWindowState. |
46 class ASH_EXPORT LockLayoutManager | 47 class ASH_EXPORT LockLayoutManager |
47 : public aura::LayoutManager, | 48 : public SnapToPixelLayoutManager, |
48 public aura::WindowObserver, | 49 public aura::WindowObserver, |
49 public VirtualKeyboardStateObserver, | 50 public VirtualKeyboardStateObserver, |
50 public keyboard::KeyboardControllerObserver { | 51 public keyboard::KeyboardControllerObserver { |
51 public: | 52 public: |
52 explicit LockLayoutManager(aura::Window* window); | 53 explicit LockLayoutManager(aura::Window* window); |
53 virtual ~LockLayoutManager(); | 54 virtual ~LockLayoutManager(); |
54 | 55 |
55 // Overridden from aura::LayoutManager: | 56 // Overridden from aura::LayoutManager: |
56 virtual void OnWindowResized() OVERRIDE; | 57 virtual void OnWindowResized() OVERRIDE; |
57 virtual void OnWindowAddedToLayout(aura::Window* child) OVERRIDE; | 58 virtual void OnWindowAddedToLayout(aura::Window* child) OVERRIDE; |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 | 94 |
94 // The bounds of the keyboard. | 95 // The bounds of the keyboard. |
95 gfx::Rect keyboard_bounds_; | 96 gfx::Rect keyboard_bounds_; |
96 | 97 |
97 DISALLOW_COPY_AND_ASSIGN(LockLayoutManager); | 98 DISALLOW_COPY_AND_ASSIGN(LockLayoutManager); |
98 }; | 99 }; |
99 | 100 |
100 } // namespace ash | 101 } // namespace ash |
101 | 102 |
102 #endif // ASH_WM_LOCK_LAYOUT_MANAGER_H_ | 103 #endif // ASH_WM_LOCK_LAYOUT_MANAGER_H_ |
OLD | NEW |