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

Side by Side Diff: ash/root_window_controller.cc

Issue 2627963004: Hide virtual keyboard before removing it from view hierarchy. (Closed)
Patch Set: Created 3 years, 11 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698