diff options
author | mhm@chromium.org <mhm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-25 00:27:18 +0000 |
---|---|---|
committer | mhm@chromium.org <mhm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-25 00:27:18 +0000 |
commit | 1299c6efbd11b23ccd46da821f2f1a39b753e0bf (patch) | |
tree | 5b9ba22d10d20a833a2f25e61fa70a3762ff4486 /chrome/browser/automation | |
parent | 217c12c787df5389c346aa7ebcd6a21efd539685 (diff) | |
download | chromium_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')
-rw-r--r-- | chrome/browser/automation/automation_provider.cc | 16 | ||||
-rw-r--r-- | chrome/browser/automation/automation_provider.h | 9 |
2 files changed, 12 insertions, 13 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 diff --git a/chrome/browser/automation/automation_provider.h b/chrome/browser/automation/automation_provider.h index abba77a..c28cb1c 100644 --- a/chrome/browser/automation/automation_provider.h +++ b/chrome/browser/automation/automation_provider.h @@ -17,7 +17,6 @@ #include "base/basictypes.h" #include "base/scoped_ptr.h" -#include "base/gfx/point.h" #include "chrome/browser/automation/automation_autocomplete_edit_tracker.h" #include "chrome/browser/automation/automation_browser_tracker.h" #include "chrome/browser/automation/automation_resource_message_filter.h" @@ -220,13 +219,13 @@ class AutomationProvider : public base::RefCounted<AutomationProvider>, void SetFilteredInet(const IPC::Message& message, bool enabled); void SetProxyConfig(const std::string& new_proxy_config); -#if defined(TOOLKIT_VIEWS) +#if defined(OS_WIN) + // TODO(port): Replace POINT. void ScheduleMouseEvent(views::View* view, views::Event::EventType type, - const gfx::Point& point, + POINT point, int flags); -#endif // defined(TOOLKIT_VIEWS) - +#endif // defined(OS_WIN) void GetFocusedViewID(int handle, int* view_id); // Helper function to find the browser window that contains a given |