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

Unified Diff: ash/wm/event_client_impl.cc

Issue 11087014: Revert 160696 - Decouple EventClientImpl and root window. Check containers on the same root window … (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: 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
===================================================================
--- ash/wm/event_client_impl.cc (revision 160706)
+++ ash/wm/event_client_impl.cc (working copy)
@@ -6,30 +6,32 @@
#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() {
+EventClientImpl::EventClientImpl(aura::RootWindow* root_window)
+ : root_window_(root_window) {
+ aura::client::SetEventClient(root_window_, this);
}
EventClientImpl::~EventClientImpl() {
+ aura::client::SetEventClient(root_window_, NULL);
}
bool EventClientImpl::CanProcessEventsWithinSubtree(
const aura::Window* window) const {
- 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,
+ if (Shell::GetInstance()->IsScreenLocked()) {
+ aura::Window* lock_screen_containers = Shell::GetContainer(
+ root_window_,
kShellWindowId_LockScreenContainersContainer);
- const aura::Window* lock_background_containers = Shell::GetContainer(
- root_window,
+ aura::Window* lock_background_containers = Shell::GetContainer(
+ root_window_,
kShellWindowId_LockScreenBackgroundContainer);
- const aura::Window* lock_screen_related_containers = Shell::GetContainer(
- root_window,
+ 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