| Index: chrome/browser/automation/ui_controls_internal.h
|
| diff --git a/chrome/browser/automation/ui_controls_internal.h b/chrome/browser/automation/ui_controls_internal.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..88631c963c70d4034f819fd3de7af58254971230
|
| --- /dev/null
|
| +++ b/chrome/browser/automation/ui_controls_internal.h
|
| @@ -0,0 +1,40 @@
|
| +// Copyright (c) 2010 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef CHROME_BROWSER_AUTOMATION_UI_CONTROLS_INTERNAL_H_
|
| +#define CHROME_BROWSER_AUTOMATION_UI_CONTROLS_INTERNAL_H_
|
| +
|
| +#include "base/message_loop.h"
|
| +#include "chrome/browser/automation/ui_controls.h"
|
| +
|
| +namespace ui_controls {
|
| +
|
| +// A utility class to send a mouse click event in a task.
|
| +// It's shared by ui_controls_linux.cc and ui_controls_mac.cc
|
| +class ClickTask : public Task {
|
| + public:
|
| + // A |followup| Task can be specified to notify the caller when the mouse
|
| + // click event is sent. If can be NULL if the caller does not care about it.
|
| + ClickTask(MouseButton button, int state, Task* followup)
|
| + : button_(button), state_(state), followup_(followup) {
|
| + }
|
| +
|
| + virtual ~ClickTask() {}
|
| +
|
| + virtual void Run() {
|
| + if (followup_)
|
| + SendMouseEventsNotifyWhenDone(button_, state_, followup_);
|
| + else
|
| + SendMouseEvents(button_, state_);
|
| + }
|
| +
|
| + private:
|
| + MouseButton button_;
|
| + int state_;
|
| + Task* followup_;
|
| +};
|
| +
|
| +} // ui_controls
|
| +
|
| +#endif // CHROME_BROWSER_AUTOMATION_UI_CONTROLS_INTERNAL_H_
|
|
|