Index: content/shell/test_runner/pixel_dump.h |
diff --git a/content/shell/test_runner/pixel_dump.h b/content/shell/test_runner/pixel_dump.h |
index a6c0a8a597abff305c1fe8da6a2c68f5a02e7a52..ba31337c68d309433ca10ae00bce690538cde474 100644 |
--- a/content/shell/test_runner/pixel_dump.h |
+++ b/content/shell/test_runner/pixel_dump.h |
@@ -6,34 +6,38 @@ |
#define CONTENT_SHELL_TEST_RUNNER_PIXEL_DUMP_H_ |
#include "base/callback_forward.h" |
-#include "content/shell/test_runner/test_runner_export.h" |
class SkBitmap; |
namespace blink { |
-class WebView; |
+class WebLocalFrame; |
} // namespace blink |
namespace test_runner { |
-class LayoutTestRuntimeFlags; |
+// Asks |web_frame|'s widget to dumps its pixels and calls |callback| with the |
alexmos
2017/07/11 15:01:06
nit: s/dumps/dump/
Łukasz Anforowicz
2017/07/11 16:30:24
Done.
|
+// result. |
+void DumpPixelsAsync(blink::WebLocalFrame* web_frame, |
+ float device_scale_factor_for_test, |
+ base::OnceCallback<void(const SkBitmap&)> callback); |
-// Dumps image snapshot of |web_view|. Exact dump mode depends on |flags| (i.e. |
-// dump_selection_rect and/or is_printing). Caller needs to ensure that |
-// |layout_test_runtime_flags| stays alive until |callback| gets called. |
-TEST_RUNNER_EXPORT void DumpPixelsAsync( |
- blink::WebView* web_view, |
- const LayoutTestRuntimeFlags& layout_test_runtime_flags, |
- float device_scale_factor_for_test, |
- const base::Callback<void(const SkBitmap&)>& callback); |
+// Asks |web_frame| to print itself and calls |callback| with the result. |
+void PrintFrameAsync(blink::WebLocalFrame* web_frame, |
+ base::OnceCallback<void(const SkBitmap&)> callback); |
-// Copy to clipboard the image present at |x|, |y| coordinates in |web_view| |
+// Creates a new callback that will first draw the current selection rect of |
alexmos
2017/07/11 15:01:06
This is called "selection bounds rect" elsewhere,
Łukasz Anforowicz
2017/07/11 16:30:23
Done (I also named the parameters of the callbacks
|
+// |web_frame| and *then* call the |original_callback|. |
+base::OnceCallback<void(const SkBitmap&)> CreateSelectionDrawingCallback( |
alexmos
2017/07/11 15:01:06
The name sounds like it draws the selection rather
Łukasz Anforowicz
2017/07/11 16:30:24
Done.
|
+ blink::WebLocalFrame* web_frame, |
+ base::OnceCallback<void(const SkBitmap&)> original_callback); |
+ |
+// Copy to clipboard the image present at |x|, |y| coordinates in |web_frame| |
// and pass the captured image to |callback|. |
void CopyImageAtAndCapturePixels( |
- blink::WebView* web_view, |
+ blink::WebLocalFrame* web_frame, |
int x, |
int y, |
- const base::Callback<void(const SkBitmap&)>& callback); |
+ base::OnceCallback<void(const SkBitmap&)> callback); |
} // namespace test_runner |