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

Unified Diff: content/shell/renderer/test_runner/test_runner.h

Issue 301243022: Add testRunner.capturePixelsThen() method (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 years, 6 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 | content/shell/renderer/test_runner/test_runner.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/shell/renderer/test_runner/test_runner.h
diff --git a/content/shell/renderer/test_runner/test_runner.h b/content/shell/renderer/test_runner/test_runner.h
index 2bda72df6f56831f0b308eff6c164484f85a4326..2a1d751fe90ccbcbda9ae870b6caee0c0c65e171 100644
--- a/content/shell/renderer/test_runner/test_runner.h
+++ b/content/shell/renderer/test_runner/test_runner.h
@@ -15,6 +15,8 @@
#include "content/shell/renderer/test_runner/web_test_runner.h"
#include "v8/include/v8.h"
+class SkBitmap;
+
namespace blink {
class WebFrame;
class WebNotificationPresenter;
@@ -531,12 +533,20 @@ class TestRunner : public WebTestRunner,
void DisplayAsync();
void DisplayAsyncThen(v8::Handle<v8::Function> callback);
+ // Similar to DisplayAsyncThen(), but pass parameters of the captured
+ // snapshot (width, height, snapshot) to the callback.
+ void CapturePixelsAsyncThen(v8::Handle<v8::Function> callback);
+
void SetMockPushClientSuccess(const std::string& end_point,
const std::string& registration_id);
void SetMockPushClientError(const std::string& message);
///////////////////////////////////////////////////////////////////////////
// Internal helpers
+
+ void CapturePixelsCallback(scoped_ptr<InvokeCallbackTask> task,
+ const SkBitmap& snapshot);
+
void CheckResponseMimeType();
void CompleteNotifyDone();
« no previous file with comments | « no previous file | content/shell/renderer/test_runner/test_runner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698