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 f83cf4dad2a9ac9f6a5fd95dd2c0ee8a21212613..fc17c4da41558d73c86d0ffaa5219b11a0625df4 100644 |
--- a/chrome/renderer/automation/automation_renderer_helper.h |
+++ b/chrome/renderer/automation/automation_renderer_helper.h |
@@ -6,22 +6,37 @@ |
#define CHROME_RENDERER_AUTOMATION_AUTOMATION_RENDERER_HELPER_H_ |
#pragma once |
+#include <string> |
+#include <vector> |
+ |
#include "content/public/renderer/render_view_observer.h" |
+#include "content/public/renderer/render_view_observer_tracker.h" |
namespace WebKit { |
class WebFrame; |
class WebURL; |
+class WebView; |
} |
// Filters automation/testing messages sent to a |RenderView| and sends |
// automation/testing messages to the browser. |
-class AutomationRendererHelper : public content::RenderViewObserver { |
+class AutomationRendererHelper |
+ : public content::RenderViewObserver, |
+ public content::RenderViewObserverTracker<AutomationRendererHelper> { |
public: |
explicit AutomationRendererHelper(content::RenderView* render_view); |
virtual ~AutomationRendererHelper(); |
+ // Takes a snapshot of the entire page without changing layout size. |
+ bool SnapshotEntirePage(WebKit::WebView* view, |
+ std::vector<unsigned char>* png_data, |
+ std::string* error_msg); |
+ |
private: |
+ void OnSnapshotEntirePage(); |
+ |
// RenderViewObserver implementation. |
+ virtual bool OnMessageReceived(const IPC::Message& message); |
virtual void WillPerformClientRedirect( |
WebKit::WebFrame* frame, const WebKit::WebURL& from, |
const WebKit::WebURL& to, double interval, double fire_time); |