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

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 check into loop. 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 1067 matching lines...) Expand 10 before | Expand all | Expand 10 after
1078 } 1078 }
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 // Allow events to fall through to the virtual keyboard even if displaying
1089 // a system modal dialog.
1090 if ((*iter)->IsVirtualKeyboardWindow(window))
1091 return true;
1088 } 1092 }
1093
1089 return false; 1094 return false;
1090 } 1095 }
1091 1096
1092 //////////////////////////////////////////////////////////////////////////////// 1097 ////////////////////////////////////////////////////////////////////////////////
1093 // Shell, ui::EventTarget overrides: 1098 // Shell, ui::EventTarget overrides:
1094 1099
1095 bool Shell::CanAcceptEvent(const ui::Event& event) { 1100 bool Shell::CanAcceptEvent(const ui::Event& event) {
1096 return true; 1101 return true;
1097 } 1102 }
1098 1103
(...skipping 16 matching lines...) Expand all
1115 //////////////////////////////////////////////////////////////////////////////// 1120 ////////////////////////////////////////////////////////////////////////////////
1116 // Shell, aura::client::ActivationChangeObserver implementation: 1121 // Shell, aura::client::ActivationChangeObserver implementation:
1117 1122
1118 void Shell::OnWindowActivated(aura::Window* gained_active, 1123 void Shell::OnWindowActivated(aura::Window* gained_active,
1119 aura::Window* lost_active) { 1124 aura::Window* lost_active) {
1120 if (gained_active) 1125 if (gained_active)
1121 target_root_window_ = gained_active->GetRootWindow(); 1126 target_root_window_ = gained_active->GetRootWindow();
1122 } 1127 }
1123 1128
1124 } // namespace ash 1129 } // 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