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

Unified Diff: ash/root_window_controller.cc

Issue 10916221: Make ToplevelWindowEventFilter and WorkspaceEventFilter into event handlers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 3 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/ash.gyp ('k') | ash/shell.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/root_window_controller.cc
===================================================================
--- ash/root_window_controller.cc (revision 155914)
+++ ash/root_window_controller.cc (working copy)
@@ -17,7 +17,7 @@
#include "ash/wm/root_window_layout_manager.h"
#include "ash/wm/screen_dimmer.h"
#include "ash/wm/system_modal_container_layout_manager.h"
-#include "ash/wm/toplevel_window_event_filter.h"
+#include "ash/wm/toplevel_window_event_handler.h"
#include "ash/wm/visibility_controller.h"
#include "ash/wm/window_properties.h"
#include "ash/wm/workspace_controller.h"
@@ -177,8 +177,10 @@
internal::kShellWindowId_DefaultContainer,
"DefaultContainer",
non_lock_screen_containers);
- default_container->SetEventFilter(
- new ToplevelWindowEventFilter(default_container));
+ if (!internal::WorkspaceController::IsWorkspace2Enabled()) {
+ default_container->AddPreTargetHandler(
+ new ToplevelWindowEventHandler(default_container));
+ }
SetChildWindowVisibilityChangesAnimated(default_container);
SetUsesScreenCoordinates(default_container);
@@ -186,8 +188,8 @@
internal::kShellWindowId_AlwaysOnTopContainer,
"AlwaysOnTopContainer",
non_lock_screen_containers);
- always_on_top_container->SetEventFilter(
- new ToplevelWindowEventFilter(always_on_top_container));
+ always_on_top_container->AddPreTargetHandler(
+ new ToplevelWindowEventHandler(always_on_top_container));
SetChildWindowVisibilityChangesAnimated(always_on_top_container);
SetUsesScreenCoordinates(always_on_top_container);
@@ -211,8 +213,8 @@
internal::kShellWindowId_SystemModalContainer,
"SystemModalContainer",
non_lock_screen_containers);
- modal_container->SetEventFilter(
- new ToplevelWindowEventFilter(modal_container));
+ modal_container->AddPreTargetHandler(
+ new ToplevelWindowEventHandler(modal_container));
modal_container->SetLayoutManager(
new internal::SystemModalContainerLayoutManager(modal_container));
SetChildWindowVisibilityChangesAnimated(modal_container);
@@ -239,8 +241,8 @@
internal::kShellWindowId_LockSystemModalContainer,
"LockSystemModalContainer",
lock_screen_containers);
- lock_modal_container->SetEventFilter(
- new ToplevelWindowEventFilter(lock_modal_container));
+ lock_modal_container->AddPreTargetHandler(
+ new ToplevelWindowEventHandler(lock_modal_container));
lock_modal_container->SetLayoutManager(
new internal::SystemModalContainerLayoutManager(lock_modal_container));
SetChildWindowVisibilityChangesAnimated(lock_modal_container);
« no previous file with comments | « ash/ash.gyp ('k') | ash/shell.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698