| 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_touch_exploration_manager_chromeos.h" | 10 #include "ash/ash_touch_exploration_manager_chromeos.h" |
| (...skipping 659 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 670 keyboard::KeyboardController* keyboard_controller) { | 670 keyboard::KeyboardController* keyboard_controller) { |
| 671 if (!keyboard_controller || | 671 if (!keyboard_controller || |
| 672 !keyboard_controller->keyboard_container_initialized()) { | 672 !keyboard_controller->keyboard_container_initialized()) { |
| 673 return; | 673 return; |
| 674 } | 674 } |
| 675 aura::Window* keyboard_container = keyboard_controller->GetContainerWindow(); | 675 aura::Window* keyboard_container = keyboard_controller->GetContainerWindow(); |
| 676 if (keyboard_container->GetRootWindow() == GetRootWindow()) { | 676 if (keyboard_container->GetRootWindow() == GetRootWindow()) { |
| 677 aura::Window* parent = | 677 aura::Window* parent = |
| 678 GetContainer(kShellWindowId_ImeWindowParentContainer); | 678 GetContainer(kShellWindowId_ImeWindowParentContainer); |
| 679 DCHECK(parent); | 679 DCHECK(parent); |
| 680 // Virtual keyboard may be deactivated while still showing, hide the |
| 681 // keyboard before removing it from view hierarchy. |
| 682 keyboard_controller->HideKeyboard( |
| 683 keyboard::KeyboardController::HIDE_REASON_AUTOMATIC); |
| 680 parent->RemoveChild(keyboard_container); | 684 parent->RemoveChild(keyboard_container); |
| 681 // Virtual keyboard may be deactivated while still showing, notify all | |
| 682 // observers that keyboard bounds changed to 0 before remove them. | |
| 683 keyboard_controller->NotifyKeyboardBoundsChanging(gfx::Rect()); | |
| 684 keyboard_controller->RemoveObserver(wm_shelf_->shelf_layout_manager()); | 685 keyboard_controller->RemoveObserver(wm_shelf_->shelf_layout_manager()); |
| 685 keyboard_controller->RemoveObserver(panel_layout_manager()); | 686 keyboard_controller->RemoveObserver(panel_layout_manager()); |
| 686 keyboard_controller->RemoveObserver(docked_window_layout_manager()); | 687 keyboard_controller->RemoveObserver(docked_window_layout_manager()); |
| 687 keyboard_controller->RemoveObserver( | 688 keyboard_controller->RemoveObserver( |
| 688 workspace_controller()->layout_manager()); | 689 workspace_controller()->layout_manager()); |
| 689 keyboard_controller->RemoveObserver( | 690 keyboard_controller->RemoveObserver( |
| 690 always_on_top_controller_->GetLayoutManager()); | 691 always_on_top_controller_->GetLayoutManager()); |
| 691 WmShell::Get()->NotifyVirtualKeyboardActivated(false); | 692 WmShell::Get()->NotifyVirtualKeyboardActivated(false); |
| 692 } | 693 } |
| 693 } | 694 } |
| (...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1131 EnableTouchHudProjection(); | 1132 EnableTouchHudProjection(); |
| 1132 else | 1133 else |
| 1133 DisableTouchHudProjection(); | 1134 DisableTouchHudProjection(); |
| 1134 } | 1135 } |
| 1135 | 1136 |
| 1136 RootWindowController* GetRootWindowController(const aura::Window* root_window) { | 1137 RootWindowController* GetRootWindowController(const aura::Window* root_window) { |
| 1137 return root_window ? GetRootWindowSettings(root_window)->controller : nullptr; | 1138 return root_window ? GetRootWindowSettings(root_window)->controller : nullptr; |
| 1138 } | 1139 } |
| 1139 | 1140 |
| 1140 } // namespace ash | 1141 } // namespace ash |
| OLD | NEW |