| Index: chrome/renderer/automation/automation_renderer_helper.h
|
| diff --git a/chrome/renderer/automation/automation_renderer_helper.h b/chrome/renderer/automation/automation_renderer_helper.h
|
| index 2b5a2cab94123103c643a0821ee124c19235fb1d..46ebb69839e01931a4198e00522206b7e740cbee 100644
|
| --- a/chrome/renderer/automation/automation_renderer_helper.h
|
| +++ b/chrome/renderer/automation/automation_renderer_helper.h
|
| @@ -9,15 +9,23 @@
|
| #include <string>
|
| #include <vector>
|
|
|
| +#include "base/memory/scoped_ptr.h"
|
| #include "content/public/renderer/render_view_observer.h"
|
| #include "content/public/renderer/render_view_observer_tracker.h"
|
|
|
| +namespace base {
|
| +class DictionaryValue;
|
| +}
|
| +
|
| namespace WebKit {
|
| class WebFrame;
|
| class WebURL;
|
| class WebView;
|
| }
|
|
|
| +struct AutomationMouseEvent;
|
| +struct ScriptEvaluationRequest;
|
| +
|
| // Filters automation/testing messages sent to a |RenderView| and sends
|
| // automation/testing messages to the browser.
|
| class AutomationRendererHelper : public content::RenderViewObserver {
|
| @@ -30,6 +38,22 @@ class AutomationRendererHelper : public content::RenderViewObserver {
|
| std::vector<unsigned char>* png_data,
|
| std::string* error_msg);
|
|
|
| + // Evaluates a list of scripts. Each script must result in exactly
|
| + // one JavaScript object, which is passed to the next script as input.
|
| + // The final output is returned in |result|. If any JavaScript object
|
| + // contains an 'error' key, |error_msg| will be set to the corresponding
|
| + // value and the method will return false. If any script throws an exception,
|
| + // this method will return false with an appropriate error message.
|
| + // |script_chain| must not be empty.
|
| + bool EvaluateScriptChain(
|
| + const std::vector<ScriptEvaluationRequest>& script_chain,
|
| + scoped_ptr<base::DictionaryValue>* result,
|
| + std::string* error_msg);
|
| +
|
| + // Processes the given event. On error, returns false and sets |error_msg|.
|
| + bool ProcessMouseEvent(const AutomationMouseEvent& event,
|
| + std::string* error_msg);
|
| +
|
| private:
|
| void OnSnapshotEntirePage();
|
| #if !defined(NO_TCMALLOC) && (defined(OS_LINUX) || defined(OS_CHROMEOS))
|
| @@ -44,6 +68,7 @@ class AutomationRendererHelper : public content::RenderViewObserver {
|
| virtual void DidCancelClientRedirect(WebKit::WebFrame* frame);
|
| virtual void DidCompleteClientRedirect(WebKit::WebFrame* frame,
|
| const WebKit::WebURL& from);
|
| + virtual void OnProcessMouseEvent(const AutomationMouseEvent& event);
|
|
|
| DISALLOW_COPY_AND_ASSIGN(AutomationRendererHelper);
|
| };
|
|
|