diff options
author | spang <spang@chromium.org> | 2015-04-01 18:34:14 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-04-02 01:34:46 +0000 |
commit | a5784b85fe478bc4fd9ebc09514878154019fa79 (patch) | |
tree | 7bb04b1522dd4ad6771529d04aae0eceafb6f5cb /extensions | |
parent | a5f9d9225b2d7cc7207b9badaaa1da475d574e6e (diff) | |
download | chromium_src-a5784b85fe478bc4fd9ebc09514878154019fa79.zip chromium_src-a5784b85fe478bc4fd9ebc09514878154019fa79.tar.gz chromium_src-a5784b85fe478bc4fd9ebc09514878154019fa79.tar.bz2 |
Revert of Fix for menus blocking user activity detection (Retry 2). (patchset #1 id:1 of https://codereview.chromium.org/1024583003/)
Reason for revert:
Breaks multiple clicking on 2nd display
Original issue's description:
> Fix for menus blocking user activity detection (Retry 2).
>
> Original CL reverted here: https://codereview.chromium.org/1013003002/
>
> Nothing has changed from that CL above. We are relanding after Oshima
> prevented marking events created from the same native event as "repeat"
> in this CL https://codereview.chromium.org/1017323002/
>
> Menus used to block detecting user activity. The fix works by making the
> UserActivityDetector a PlatformEventObserver rather than an
> EventHandler.
> Also made sure that PlatformEventSource has an instance in
> ozone_platform_test.cc
>
> TBR=sadrul@chromium.org,spang@chromium.org,oshima@chromium.org,jamescook@chromium.org
> BUG=462735
> TEST=ui_base_unittests --gtest_filter=UserActivityDetectorTest.*
>
> Committed: https://crrev.com/dbfa9102e7c6dfa13439ef1502d4baa9c3a31f31
> Cr-Commit-Position: refs/heads/master@{#321426}
TBR=jamescook@chromium.org,oshima@chromium.org,sadrul@chromium.org,afakhry@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=462735, 472222
Review URL: https://codereview.chromium.org/1053773003
Cr-Commit-Position: refs/heads/master@{#323394}
Diffstat (limited to 'extensions')
-rw-r--r-- | extensions/shell/browser/shell_desktop_controller_aura.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/extensions/shell/browser/shell_desktop_controller_aura.cc b/extensions/shell/browser/shell_desktop_controller_aura.cc index ffa1383..1f45df2 100644 --- a/extensions/shell/browser/shell_desktop_controller_aura.cc +++ b/extensions/shell/browser/shell_desktop_controller_aura.cc @@ -279,6 +279,8 @@ void ShellDesktopControllerAura::InitWindowManager() { 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 @@ void ShellDesktopControllerAura::DestroyRootWindow() { 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) { |