diff options
Diffstat (limited to 'chrome/browser/automation/automation_provider.cc')
-rw-r--r-- | chrome/browser/automation/automation_provider.cc | 16 |
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 |