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/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 Loading... | |
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 Loading... | |
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 |
OLD | NEW |