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

Unified Diff: ash/shell.cc

Issue 2127263002: Keep the SystemModalContainerEventHandler added (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Ignore touch/pointer events on Arc windows if modal open Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/shell.h ('k') | ash/wm/system_modal_container_event_filter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/shell.cc
diff --git a/ash/shell.cc b/ash/shell.cc
index 61caa6dc7a013bd01a0bd4f4d38a6191021138fa..e6e3a4925a7178e055e80e1716c79a590b4a8c4e 100644
--- a/ash/shell.cc
+++ b/ash/shell.cc
@@ -501,10 +501,6 @@ void Shell::NotifyFullscreenStateChange(bool is_fullscreen,
}
void Shell::CreateModalBackground(aura::Window* window) {
- if (!modality_filter_) {
- modality_filter_.reset(new SystemModalContainerEventFilter(this));
- AddPreTargetHandler(modality_filter_.get());
- }
RootWindowControllerList controllers = GetAllRootWindowControllers();
for (RootWindowControllerList::iterator iter = controllers.begin();
iter != controllers.end(); ++iter)
@@ -521,8 +517,6 @@ void Shell::OnModalWindowRemoved(aura::Window* removed) {
->ActivateNextModalWindow();
}
if (!activated) {
- RemovePreTargetHandler(modality_filter_.get());
- modality_filter_.reset();
for (RootWindowControllerList::iterator iter = controllers.begin();
iter != controllers.end(); ++iter)
(*iter)->GetSystemModalLayoutManager(removed)->DestroyModalBackground();
@@ -658,6 +652,7 @@ Shell::~Shell() {
RemovePreTargetHandler(system_gesture_filter_.get());
RemovePreTargetHandler(keyboard_metrics_filter_.get());
RemovePreTargetHandler(mouse_cursor_filter_.get());
+ RemovePreTargetHandler(modality_filter_.get());
// TooltipController is deleted with the Shell so removing its references.
RemovePreTargetHandler(tooltip_controller_.get());
@@ -1004,6 +999,9 @@ void Shell::Init(const ShellInitParams& init_params) {
std::unique_ptr<views::corewm::Tooltip>(new views::corewm::TooltipAura)));
AddPreTargetHandler(tooltip_controller_.get());
+ modality_filter_.reset(new SystemModalContainerEventFilter(this));
+ AddPreTargetHandler(modality_filter_.get());
+
event_client_.reset(new EventClientImpl);
// This controller needs to be set before SetupManagedWindowMode.
« no previous file with comments | « ash/shell.h ('k') | ash/wm/system_modal_container_event_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698