| Index: chrome/browser/automation/automation_provider.cc
|
| ===================================================================
|
| --- chrome/browser/automation/automation_provider.cc (revision 23880)
|
| +++ chrome/browser/automation/automation_provider.cc (working copy)
|
| @@ -73,6 +73,7 @@
|
| #include "views/window/window.h"
|
| #elif defined(OS_LINUX)
|
| #include "chrome/browser/gtk/view_id_util.h"
|
| +#include "chrome/common/gtk_util.h"
|
| #endif
|
|
|
| using base::Time;
|
| @@ -792,7 +793,7 @@
|
| #if !defined(OS_MACOSX)
|
| class ClickTask : public Task {
|
| public:
|
| - ClickTask(gfx::Point point, int flags) : point_(point), flags_(flags) {}
|
| + explicit ClickTask(int flags) : flags_(flags) {}
|
| virtual ~ClickTask() {}
|
|
|
| virtual void Run() {
|
| @@ -810,11 +811,10 @@
|
| NOTREACHED();
|
| }
|
|
|
| - ui_controls::SendMouseClick(point_, button);
|
| + ui_controls::SendMouseClick(button);
|
| }
|
|
|
| private:
|
| - gfx::Point point_;
|
| int flags_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(ClickTask);
|
| @@ -1526,11 +1526,9 @@
|
| widget->allocation.width, widget->allocation.height);
|
| gint x, y;
|
| if (screen_coordinates) {
|
| - gdk_window_get_origin(widget->window, &x, &y);
|
| - if (GTK_WIDGET_NO_WINDOW(widget)) {
|
| - x += widget->allocation.x;
|
| - y += widget->allocation.y;
|
| - }
|
| + gfx::Point point = gtk_util::GetWidgetScreenPosition(widget);
|
| + x = point.x();
|
| + y = point.y();
|
| } else {
|
| gtk_widget_translate_coordinates(widget, GTK_WIDGET(window),
|
| 0, 0, &x, &y);
|
| @@ -1656,7 +1654,7 @@
|
|
|
| if (window_tracker_->ContainsHandle(handle)) {
|
| ui_controls::SendMouseMoveNotifyWhenDone(click.x(), click.y(),
|
| - new ClickTask(click, flags));
|
| + new ClickTask(flags));
|
| }
|
| }
|
| #endif
|
|
|