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

Side by Side 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, 10 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ash/autoclick/autoclick_controller.h" 5 #include "ash/autoclick/autoclick_controller.h"
6 6
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "ash/wm/coordinate_conversion.h" 8 #include "ash/wm/coordinate_conversion.h"
9 #include "base/timer/timer.h" 9 #include "base/timer/timer.h"
10 #include "ui/aura/env.h" 10 #include "ui/aura/env.h"
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 click_location, 193 click_location,
194 click_location, 194 click_location,
195 mouse_event_flags_ | ui::EF_LEFT_MOUSE_BUTTON, 195 mouse_event_flags_ | ui::EF_LEFT_MOUSE_BUTTON,
196 ui::EF_LEFT_MOUSE_BUTTON); 196 ui::EF_LEFT_MOUSE_BUTTON);
197 ui::MouseEvent release_event(ui::ET_MOUSE_RELEASED, 197 ui::MouseEvent release_event(ui::ET_MOUSE_RELEASED,
198 click_location, 198 click_location,
199 click_location, 199 click_location,
200 mouse_event_flags_ | ui::EF_LEFT_MOUSE_BUTTON, 200 mouse_event_flags_ | ui::EF_LEFT_MOUSE_BUTTON,
201 ui::EF_LEFT_MOUSE_BUTTON); 201 ui::EF_LEFT_MOUSE_BUTTON);
202 202
203 dispatcher->AsWindowTreeHostDelegate()->OnHostMouseEvent(&press_event); 203 ui::EventDispatchDetails details =
204 dispatcher->AsWindowTreeHostDelegate()->OnHostMouseEvent(&release_event); 204 dispatcher->OnEventFromSource(&press_event);
205 if (!details.dispatcher_destroyed)
206 details = dispatcher->OnEventFromSource(&release_event);
207 if (details.dispatcher_destroyed)
208 return;
205 } 209 }
206 210
207 // static. 211 // static.
208 AutoclickController* AutoclickController::CreateInstance() { 212 AutoclickController* AutoclickController::CreateInstance() {
209 return new AutoclickControllerImpl(); 213 return new AutoclickControllerImpl();
210 } 214 }
211 215
212 } // namespace ash 216 } // namespace ash
OLDNEW
« 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