Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3858)

Unified Diff: chrome/browser/automation/automation_provider.cc

Issue 174201: More interactive test porting for Linux. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fixes Created 11 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/automation/ui_controls.h » ('j') | chrome/common/gtk_util.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « no previous file | chrome/browser/automation/ui_controls.h » ('j') | chrome/common/gtk_util.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698