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

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: Move VK window test to root window controller. Created 6 years, 8 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 | « ash/root_window_controller_unittest.cc ('k') | 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 if (GetPrimaryRootWindowController()->IsVirtualKeyboardWindow(window))
oshima 2014/03/28 21:49:56 can you move this to the loop above? I think it's
kevers 2014/03/31 17:21:17 Done.
1093 return true;
1094
1089 return false; 1095 return false;
1090 } 1096 }
1091 1097
1092 //////////////////////////////////////////////////////////////////////////////// 1098 ////////////////////////////////////////////////////////////////////////////////
1093 // Shell, ui::EventTarget overrides: 1099 // Shell, ui::EventTarget overrides:
1094 1100
1095 bool Shell::CanAcceptEvent(const ui::Event& event) { 1101 bool Shell::CanAcceptEvent(const ui::Event& event) {
1096 return true; 1102 return true;
1097 } 1103 }
1098 1104
(...skipping 16 matching lines...) Expand all
1115 //////////////////////////////////////////////////////////////////////////////// 1121 ////////////////////////////////////////////////////////////////////////////////
1116 // Shell, aura::client::ActivationChangeObserver implementation: 1122 // Shell, aura::client::ActivationChangeObserver implementation:
1117 1123
1118 void Shell::OnWindowActivated(aura::Window* gained_active, 1124 void Shell::OnWindowActivated(aura::Window* gained_active,
1119 aura::Window* lost_active) { 1125 aura::Window* lost_active) {
1120 if (gained_active) 1126 if (gained_active)
1121 target_root_window_ = gained_active->GetRootWindow(); 1127 target_root_window_ = gained_active->GetRootWindow();
1122 } 1128 }
1123 1129
1124 } // namespace ash 1130 } // namespace ash
OLDNEW
« no previous file with comments | « ash/root_window_controller_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698