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

Unified Diff: chrome/renderer/automation/automation_renderer_helper.h

Issue 8294030: Fix snapshotting on linux by creating a separate automation path for (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ... Created 9 years, 2 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/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..7b937b3cc90a89dbe2a0818d4394b9731868fba3 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 resizing.
+ 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);

Powered by Google App Engine
This is Rietveld 408576698