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

Unified Diff: ash/autoclick/autoclick_controller.cc

Issue 147203004: aura: Remove event-dispatch methods from WindowTreeHostDelegate interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: win Created 6 years, 11 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/accelerators/accelerator_controller_unittest.cc ('k') | ash/drag_drop/drag_drop_controller_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/autoclick/autoclick_controller.cc
diff --git a/ash/autoclick/autoclick_controller.cc b/ash/autoclick/autoclick_controller.cc
index c72d88afc6fd719604f2a40006facfb9ae43e9dc..accd9b11e6f4255603fafbb2ac78a24f68b17a93 100644
--- a/ash/autoclick/autoclick_controller.cc
+++ b/ash/autoclick/autoclick_controller.cc
@@ -200,8 +200,12 @@ void AutoclickControllerImpl::DoAutoclick() {
mouse_event_flags_ | ui::EF_LEFT_MOUSE_BUTTON,
ui::EF_LEFT_MOUSE_BUTTON);
- dispatcher->AsWindowTreeHostDelegate()->OnHostMouseEvent(&press_event);
- dispatcher->AsWindowTreeHostDelegate()->OnHostMouseEvent(&release_event);
+ ui::EventDispatchDetails details =
+ dispatcher->OnEventFromSource(&press_event);
+ if (!details.dispatcher_destroyed)
+ details = dispatcher->OnEventFromSource(&release_event);
+ if (details.dispatcher_destroyed)
+ return;
}
// static.
« no previous file with comments | « ash/accelerators/accelerator_controller_unittest.cc ('k') | ash/drag_drop/drag_drop_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698