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

Unified Diff: extensions/shell/browser/shell_desktop_controller_aura.cc

Issue 1016173002: Revert of Fix for menus blocking user activity detection (Retry). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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.cc ('k') | ui/base/user_activity/user_activity_detector.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/shell/browser/shell_desktop_controller_aura.cc
diff --git a/extensions/shell/browser/shell_desktop_controller_aura.cc b/extensions/shell/browser/shell_desktop_controller_aura.cc
index 32983bb403272941dbf6b4185ca02b6b34c92cc2..a3dcd6e79e9f17adfa5bc0c658e937e3a156f9fa 100644
--- a/extensions/shell/browser/shell_desktop_controller_aura.cc
+++ b/extensions/shell/browser/shell_desktop_controller_aura.cc
@@ -279,6 +279,8 @@
aura::client::SetCursorClient(host_->window(), cursor_manager_.get());
user_activity_detector_.reset(new ui::UserActivityDetector);
+ host_->event_processor()->GetRootTarget()->AddPreTargetHandler(
+ user_activity_detector_.get());
#if defined(OS_CHROMEOS)
user_activity_notifier_.reset(
new ui::UserActivityPowerManagerNotifier(user_activity_detector_.get()));
@@ -322,6 +324,10 @@
host_->RemoveObserver(this);
if (input_method_filter_)
root_window_event_filter_->RemoveHandler(input_method_filter_.get());
+ if (user_activity_detector_) {
+ host_->event_processor()->GetRootTarget()->RemovePreTargetHandler(
+ user_activity_detector_.get());
+ }
wm::FocusController* focus_controller =
static_cast<wm::FocusController*>(focus_client_.get());
if (focus_controller) {
« no previous file with comments | « ash/shell.cc ('k') | ui/base/user_activity/user_activity_detector.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698