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

Unified Diff: ash/wm/event_client_impl.cc

Issue 11047030: Decouple EventClientImpl and root window. Check containers on the same root window as focused windo… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix type in event_filter_unittest Created 8 years, 2 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/wm/event_client_impl.h ('k') | ash/wm/power_button_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/event_client_impl.cc
diff --git a/ash/wm/event_client_impl.cc b/ash/wm/event_client_impl.cc
index 4482c11c952e0ae8cbed5df1b2e04a668960c74f..f7fc8b271c9582f0d6068f58915d9770f302eacf 100644
--- a/ash/wm/event_client_impl.cc
+++ b/ash/wm/event_client_impl.cc
@@ -6,32 +6,30 @@
#include "ash/shell.h"
#include "ash/shell_window_ids.h"
-#include "ui/aura/root_window.h"
#include "ui/aura/window.h"
namespace ash {
namespace internal {
-EventClientImpl::EventClientImpl(aura::RootWindow* root_window)
- : root_window_(root_window) {
- aura::client::SetEventClient(root_window_, this);
+EventClientImpl::EventClientImpl() {
}
EventClientImpl::~EventClientImpl() {
- aura::client::SetEventClient(root_window_, NULL);
}
bool EventClientImpl::CanProcessEventsWithinSubtree(
const aura::Window* window) const {
- if (Shell::GetInstance()->IsScreenLocked()) {
- aura::Window* lock_screen_containers = Shell::GetContainer(
- root_window_,
+ const aura::RootWindow* root_window =
+ window ? window->GetRootWindow() : NULL;
+ if (Shell::GetInstance()->IsScreenLocked() && root_window) {
+ const aura::Window* lock_screen_containers = Shell::GetContainer(
+ root_window,
kShellWindowId_LockScreenContainersContainer);
- aura::Window* lock_background_containers = Shell::GetContainer(
- root_window_,
+ const aura::Window* lock_background_containers = Shell::GetContainer(
+ root_window,
kShellWindowId_LockScreenBackgroundContainer);
- aura::Window* lock_screen_related_containers = Shell::GetContainer(
- root_window_,
+ const aura::Window* lock_screen_related_containers = Shell::GetContainer(
+ root_window,
kShellWindowId_LockScreenRelatedContainersContainer);
return lock_screen_containers->Contains(window) ||
lock_background_containers->Contains(window) ||
« no previous file with comments | « ash/wm/event_client_impl.h ('k') | ash/wm/power_button_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698