| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "chrome/browser/automation/ui_controls_internal.h" | 5 #include "chrome/browser/automation/ui_controls_internal.h" |
| 6 | 6 |
| 7 namespace ui_controls { | 7 namespace ui_controls { |
| 8 | 8 |
| 9 ClickTask::ClickTask(MouseButton button, int state, Task* followup) | 9 ClickTask::ClickTask(MouseButton button, int state, |
| 10 const base::Closure& followup) |
| 10 : button_(button), state_(state), followup_(followup) { | 11 : button_(button), state_(state), followup_(followup) { |
| 11 } | 12 } |
| 12 | 13 |
| 13 ClickTask::~ClickTask() {} | 14 ClickTask::~ClickTask() {} |
| 14 | 15 |
| 15 void ClickTask::Run() { | 16 void ClickTask::Run() { |
| 16 if (followup_) | 17 if (!followup_.is_null()) |
| 17 SendMouseEventsNotifyWhenDone(button_, state_, followup_); | 18 SendMouseEventsNotifyWhenDone(button_, state_, followup_); |
| 18 else | 19 else |
| 19 SendMouseEvents(button_, state_); | 20 SendMouseEvents(button_, state_); |
| 20 } | 21 } |
| 21 | 22 |
| 22 } // ui_controls | 23 } // ui_controls |
| OLD | NEW |