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

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

Issue 5572001: Send screenshots back to the client for debugging (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: need to push again to make sure rietveld didn't screw up Created 9 years, 9 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/testing_automation_provider.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/automation/automation_provider_observers.cc
diff --git a/chrome/browser/automation/automation_provider_observers.cc b/chrome/browser/automation/automation_provider_observers.cc
index 94b80a3e2e1d12246ae36991db7cbf2259ad7212..1a90de889d1dbf91accf918670859efe66ab9a32 100644
--- a/chrome/browser/automation/automation_provider_observers.cc
+++ b/chrome/browser/automation/automation_provider_observers.cc
@@ -1644,9 +1644,13 @@ void PageSnapshotTaker::ExecuteScript(const std::wstring& javascript) {
void PageSnapshotTaker::SendMessage(bool success) {
if (automation_) {
- AutomationMsg_CaptureEntirePageAsPNG::WriteReplyParams(reply_message_.get(),
- success);
- automation_->Send(reply_message_.release());
+ if (success) {
+ AutomationJSONReply(automation_, reply_message_.release())
+ .SendSuccess(NULL);
+ } else {
+ AutomationJSONReply(automation_, reply_message_.release())
+ .SendError("Failed to take snapshot of page");
+ }
}
delete this;
}
« no previous file with comments | « no previous file | chrome/browser/automation/testing_automation_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698