summaryrefslogtreecommitdiffstats
path: root/chrome/browser/automation/automation_provider.cc
diff options
context:
space:
mode:
authormhm@chromium.org <mhm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-25 00:27:18 +0000
committermhm@chromium.org <mhm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-25 00:27:18 +0000
commit1299c6efbd11b23ccd46da821f2f1a39b753e0bf (patch)
tree5b9ba22d10d20a833a2f25e61fa70a3762ff4486 /chrome/browser/automation/automation_provider.cc
parent217c12c787df5389c346aa7ebcd6a21efd539685 (diff)
downloadchromium_src-1299c6efbd11b23ccd46da821f2f1a39b753e0bf.zip
chromium_src-1299c6efbd11b23ccd46da821f2f1a39b753e0bf.tar.gz
chromium_src-1299c6efbd11b23ccd46da821f2f1a39b753e0bf.tar.bz2
Reverting 21588 to make Linux toolkit dbg happy.
TBR: thiago Review URL: http://codereview.chromium.org/159378 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21597 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/automation/automation_provider.cc')
-rw-r--r--chrome/browser/automation/automation_provider.cc16
1 files changed, 8 insertions, 8 deletions
diff --git a/chrome/browser/automation/automation_provider.cc b/chrome/browser/automation/automation_provider.cc
index 52ef8e9..1ce2c87 100644
--- a/chrome/browser/automation/automation_provider.cc
+++ b/chrome/browser/automation/automation_provider.cc
@@ -1479,7 +1479,8 @@ void AutomationProvider::WindowGetViewBounds(int handle, int view_id,
#endif
}
-#if defined(TOOLKIT_VIEWS)
+#if defined(OS_WIN)
+// TODO(port): Use portable replacement for POINT.
// This task enqueues a mouse event on the event loop, so that the view
// that it's being sent to can do the requisite post-processing.
@@ -1487,20 +1488,20 @@ class MouseEventTask : public Task {
public:
MouseEventTask(views::View* view,
views::Event::EventType type,
- const gfx::Point& point,
+ POINT point,
int flags)
: view_(view), type_(type), point_(point), flags_(flags) {}
virtual ~MouseEventTask() {}
virtual void Run() {
- views::MouseEvent event(type_, point_.x(), point_.y(), flags_);
+ views::MouseEvent event(type_, point_.x, point_.y, flags_);
// We need to set the cursor position before we process the event because
// some code (tab dragging, for instance) queries the actual cursor location
// rather than the location of the mouse event. Note that the reason why
// the drag code moved away from using mouse event locations was because
// our conversion to screen location doesn't work well with multiple
// monitors, so this only works reliably in a single monitor setup.
- gfx::Point screen_location(point_.x(), point_.y());
+ gfx::Point screen_location(point_.x, point_.y);
view_->ConvertPointToScreen(view_, &screen_location);
::SetCursorPos(screen_location.x(), screen_location.y());
switch (type_) {
@@ -1524,7 +1525,7 @@ class MouseEventTask : public Task {
private:
views::View* view_;
views::Event::EventType type_;
- gfx::Point point_;
+ POINT point_;
int flags_;
DISALLOW_COPY_AND_ASSIGN(MouseEventTask);
@@ -1532,13 +1533,12 @@ class MouseEventTask : public Task {
void AutomationProvider::ScheduleMouseEvent(views::View* view,
views::Event::EventType type,
- const gfx::Point& point,
+ POINT point,
int flags) {
MessageLoop::current()->PostTask(FROM_HERE,
new MouseEventTask(view, type, point, flags));
}
-
-#endif // defined(TOOLKIT_VIEWS)
+#endif // defined(OS_WIN)
// This task just adds another task to the event queue. This is useful if
// you want to ensure that any tasks added to the event queue after this one