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 #include "ash/wm/lock_layout_manager.h" | 5 #include "ash/wm/lock_layout_manager.h" |
6 | 6 |
7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
8 #include "ash/shell_delegate.h" | 8 #include "ash/shell_delegate.h" |
9 #include "ash/wm/lock_window_state.h" | 9 #include "ash/wm/lock_window_state.h" |
10 #include "ash/wm/window_state.h" | 10 #include "ash/wm/window_state.h" |
11 #include "ash/wm/wm_event.h" | 11 #include "ash/wm/wm_event.h" |
12 #include "ui/aura/window.h" | 12 #include "ui/aura/window.h" |
13 #include "ui/aura/window_observer.h" | 13 #include "ui/aura/window_observer.h" |
14 #include "ui/events/event.h" | 14 #include "ui/events/event.h" |
15 #include "ui/keyboard/keyboard_controller.h" | 15 #include "ui/keyboard/keyboard_controller.h" |
16 #include "ui/keyboard/keyboard_util.h" | 16 #include "ui/keyboard/keyboard_util.h" |
17 | 17 |
18 namespace ash { | 18 namespace ash { |
19 | 19 |
20 LockLayoutManager::LockLayoutManager(aura::Window* window) | 20 LockLayoutManager::LockLayoutManager(aura::Window* window) |
21 : window_(window), | 21 : SnapToPixelLayoutManager(window), |
| 22 window_(window), |
22 root_window_(window->GetRootWindow()), | 23 root_window_(window->GetRootWindow()), |
23 is_observing_keyboard_(false) { | 24 is_observing_keyboard_(false) { |
24 Shell::GetInstance()->delegate()->AddVirtualKeyboardStateObserver(this); | 25 Shell::GetInstance()->delegate()->AddVirtualKeyboardStateObserver(this); |
25 root_window_->AddObserver(this); | 26 root_window_->AddObserver(this); |
26 if (keyboard::KeyboardController::GetInstance()) { | 27 if (keyboard::KeyboardController::GetInstance()) { |
27 keyboard::KeyboardController::GetInstance()->AddObserver(this); | 28 keyboard::KeyboardController::GetInstance()->AddObserver(this); |
28 is_observing_keyboard_ = true; | 29 is_observing_keyboard_ = true; |
29 } | 30 } |
30 } | 31 } |
31 | 32 |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 event->type() == wm::WM_EVENT_WORKAREA_BOUNDS_CHANGED); | 131 event->type() == wm::WM_EVENT_WORKAREA_BOUNDS_CHANGED); |
131 | 132 |
132 for (aura::Window::Windows::const_iterator it = window_->children().begin(); | 133 for (aura::Window::Windows::const_iterator it = window_->children().begin(); |
133 it != window_->children().end(); | 134 it != window_->children().end(); |
134 ++it) { | 135 ++it) { |
135 wm::GetWindowState(*it)->OnWMEvent(event); | 136 wm::GetWindowState(*it)->OnWMEvent(event); |
136 } | 137 } |
137 } | 138 } |
138 | 139 |
139 } // namespace ash | 140 } // namespace ash |
OLD | NEW |