| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/root_window_controller.h" | 5 #include "ash/root_window_controller.h" |
| 6 | 6 |
| 7 #include <queue> | 7 #include <queue> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "ash/ash_constants.h" | 10 #include "ash/ash_constants.h" |
| (...skipping 599 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 610 // RootWindowLayoutManager. Remove this after fixed RootWindowLayoutManager. | 610 // RootWindowLayoutManager. Remove this after fixed RootWindowLayoutManager. |
| 611 keyboard_container->SetBounds(parent->bounds()); | 611 keyboard_container->SetBounds(parent->bounds()); |
| 612 } | 612 } |
| 613 | 613 |
| 614 void RootWindowController::DeactivateKeyboard( | 614 void RootWindowController::DeactivateKeyboard( |
| 615 keyboard::KeyboardController* keyboard_controller) { | 615 keyboard::KeyboardController* keyboard_controller) { |
| 616 if (!keyboard::IsKeyboardEnabled()) | 616 if (!keyboard::IsKeyboardEnabled()) |
| 617 return; | 617 return; |
| 618 | 618 |
| 619 DCHECK(keyboard_controller); | 619 DCHECK(keyboard_controller); |
| 620 if (!keyboard_controller->keyboard_container_initialized()) |
| 621 return; |
| 622 |
| 620 aura::Window* keyboard_container = | 623 aura::Window* keyboard_container = |
| 621 keyboard_controller->GetContainerWindow(); | 624 keyboard_controller->GetContainerWindow(); |
| 622 if (keyboard_container->GetRootWindow() == root_window()) { | 625 if (keyboard_container->GetRootWindow() == root_window()) { |
| 623 root_window()->RemoveChild(keyboard_container); | 626 root_window()->RemoveChild(keyboard_container); |
| 624 if (!keyboard::IsKeyboardUsabilityExperimentEnabled()) { | 627 if (!keyboard::IsKeyboardUsabilityExperimentEnabled()) { |
| 625 keyboard_controller->RemoveObserver(shelf()->shelf_layout_manager()); | 628 keyboard_controller->RemoveObserver(shelf()->shelf_layout_manager()); |
| 626 keyboard_controller->RemoveObserver(panel_layout_manager_); | 629 keyboard_controller->RemoveObserver(panel_layout_manager_); |
| 627 keyboard_controller->RemoveObserver(docked_layout_manager_); | 630 keyboard_controller->RemoveObserver(docked_layout_manager_); |
| 628 } | 631 } |
| 629 } | 632 } |
| (...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 975 DisableTouchHudProjection(); | 978 DisableTouchHudProjection(); |
| 976 } | 979 } |
| 977 | 980 |
| 978 RootWindowController* GetRootWindowController( | 981 RootWindowController* GetRootWindowController( |
| 979 const aura::Window* root_window) { | 982 const aura::Window* root_window) { |
| 980 return root_window ? GetRootWindowSettings(root_window)->controller : NULL; | 983 return root_window ? GetRootWindowSettings(root_window)->controller : NULL; |
| 981 } | 984 } |
| 982 | 985 |
| 983 } // namespace internal | 986 } // namespace internal |
| 984 } // namespace ash | 987 } // namespace ash |
| OLD | NEW |