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

Unified Diff: chrome/browser/automation/automation_tab_helper.h

Issue 10384023: Determine the element location and click synchronously on the renderer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 7 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
Index: chrome/browser/automation/automation_tab_helper.h
diff --git a/chrome/browser/automation/automation_tab_helper.h b/chrome/browser/automation/automation_tab_helper.h
index 739d0cc866379b4e9bb7595e1bcc013adcfe1664..04839e86e16f21f7306d93cf0ababfee1dc75860 100644
--- a/chrome/browser/automation/automation_tab_helper.h
+++ b/chrome/browser/automation/automation_tab_helper.h
@@ -14,8 +14,13 @@
#include "base/memory/weak_ptr.h"
#include "content/public/browser/web_contents_observer.h"
+struct AutomationMouseEvent;
class AutomationTabHelper;
+namespace gfx {
+class Point;
+}
+
// An observer API implemented by classes which are interested in various
// tab events from AutomationTabHelper(s).
class TabEventObserver {
@@ -49,6 +54,14 @@ class TabEventObserver {
const std::vector<unsigned char>& png_data,
const std::string& error_msg) { }
+ // Called immediately before the tab processes an automation mouse event.
+ virtual void OnWillProcessMouseEventAt(const gfx::Point& point) { }
+
+ // Called after the tab processes an automation mouse event.
+ // If |success| is false, |error_msg| will be set.
+ virtual void OnProcessMouseEventACK(bool success,
+ const std::string& error_msg) { }
+
protected:
TabEventObserver();
virtual ~TabEventObserver();
@@ -93,6 +106,8 @@ class AutomationTabHelper
void HeapProfilerDump(const std::string& reason);
#endif // !defined(NO_TCMALLOC) && (defined(OS_LINUX) || defined(OS_CHROMEOS))
+ void ProcessMouseEvent(const AutomationMouseEvent& event);
+
// Returns true if the tab is loading or the tab is scheduled to load
// immediately. Note that scheduled loads may be canceled.
bool has_pending_loads() const;
@@ -104,6 +119,9 @@ class AutomationTabHelper
bool success,
const std::vector<unsigned char>& png_data,
const std::string& error_msg);
+ void OnWillProcessMouseEventAt(const gfx::Point& point);
+ void OnProcessMouseEventACK(bool success,
+ const std::string& error_msg);
// content::WebContentsObserver implementation.
virtual void DidStartLoading() OVERRIDE;

Powered by Google App Engine
This is Rietveld 408576698