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

Side by Side Diff: ash/shell.cc

Issue 216743004: Prevent system modal dialog from blocking events to the virtual keyboard. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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 | Annotate | Revision Log
« 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/shell.h" 5 #include "ash/shell.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 9
10 #include "ash/accelerators/accelerator_controller.h" 10 #include "ash/accelerators/accelerator_controller.h"
(...skipping 1068 matching lines...) Expand 10 before | Expand all | Expand 10 after
1079 1079
1080 bool Shell::CanWindowReceiveEvents(aura::Window* window) { 1080 bool Shell::CanWindowReceiveEvents(aura::Window* window) {
1081 RootWindowControllerList controllers = GetAllRootWindowControllers(); 1081 RootWindowControllerList controllers = GetAllRootWindowControllers();
1082 for (RootWindowControllerList::iterator iter = controllers.begin(); 1082 for (RootWindowControllerList::iterator iter = controllers.begin();
1083 iter != controllers.end(); ++iter) { 1083 iter != controllers.end(); ++iter) {
1084 internal::SystemModalContainerLayoutManager* layout_manager = 1084 internal::SystemModalContainerLayoutManager* layout_manager =
1085 (*iter)->GetSystemModalLayoutManager(window); 1085 (*iter)->GetSystemModalLayoutManager(window);
1086 if (layout_manager && layout_manager->CanWindowReceiveEvents(window)) 1086 if (layout_manager && layout_manager->CanWindowReceiveEvents(window))
1087 return true; 1087 return true;
1088 } 1088 }
1089
1090 // Allow events to fall through to the virtual keyboard even if displaying
1091 // a system modal dialog.
1092 aura::Window* keyboard_container = GetPrimaryRootWindowController()->
1093 GetContainer(internal::kShellWindowId_VirtualKeyboardParentContainer);
1094 if (keyboard_container && keyboard_container->Contains(window))
oshima 2014/03/28 16:55:15 Will keyboard_contorller->GetContainerWindow()->C
kevers 2014/03/28 17:52:37 keyboard_controller->GetContainerWindow() has side
oshima 2014/03/28 20:02:42 If that's the case, can you check this in RWC (say
kevers 2014/03/28 21:11:00 Done.
1095 return true;
1096
1089 return false; 1097 return false;
1090 } 1098 }
1091 1099
1092 //////////////////////////////////////////////////////////////////////////////// 1100 ////////////////////////////////////////////////////////////////////////////////
1093 // Shell, ui::EventTarget overrides: 1101 // Shell, ui::EventTarget overrides:
1094 1102
1095 bool Shell::CanAcceptEvent(const ui::Event& event) { 1103 bool Shell::CanAcceptEvent(const ui::Event& event) {
1096 return true; 1104 return true;
1097 } 1105 }
1098 1106
(...skipping 16 matching lines...) Expand all
1115 //////////////////////////////////////////////////////////////////////////////// 1123 ////////////////////////////////////////////////////////////////////////////////
1116 // Shell, aura::client::ActivationChangeObserver implementation: 1124 // Shell, aura::client::ActivationChangeObserver implementation:
1117 1125
1118 void Shell::OnWindowActivated(aura::Window* gained_active, 1126 void Shell::OnWindowActivated(aura::Window* gained_active,
1119 aura::Window* lost_active) { 1127 aura::Window* lost_active) {
1120 if (gained_active) 1128 if (gained_active)
1121 target_root_window_ = gained_active->GetRootWindow(); 1129 target_root_window_ = gained_active->GetRootWindow();
1122 } 1130 }
1123 1131
1124 } // namespace ash 1132 } // 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