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

Unified Diff: chrome/browser/android/feedback/screenshot_task.cc

Issue 2592983002: [devtools] Support different encodings for Page.CaptureScreenshot. (Closed)
Patch Set: Return gfx::Image from ui snapshot methods instead. Created 3 years, 11 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/browser/android/feedback/screenshot_task.cc
diff --git a/chrome/browser/android/feedback/screenshot_task.cc b/chrome/browser/android/feedback/screenshot_task.cc
index 4e8d3e2a2db6f711650562d19eb56d65b1ff5119..038110191a3829a6ddbb462e35f518a13946ded3 100644
--- a/chrome/browser/android/feedback/screenshot_task.cc
+++ b/chrome/browser/android/feedback/screenshot_task.cc
@@ -31,7 +31,7 @@ bool RegisterScreenshotTask(JNIEnv* env) {
void SnapshotCallback(JNIEnv* env,
const JavaRef<jobject>& callback,
- scoped_refptr<base::RefCountedBytes> png_data) {
+ scoped_refptr<base::RefCountedMemory> png_data) {
jbyteArray jbytes = nullptr;
if (png_data.get()) {
size_t size = png_data->size();
@@ -50,7 +50,7 @@ void GrabWindowSnapshotAsync(JNIEnv* env,
WindowAndroid* window_android = reinterpret_cast<WindowAndroid*>(
native_window_android);
gfx::Rect window_bounds(window_width, window_height);
- ui::GrabWindowSnapshotAsync(
+ ui::GrabWindowSnapshotAsyncPNG(
window_android, window_bounds, base::ThreadTaskRunnerHandle::Get(),
base::Bind(&SnapshotCallback, env,
ScopedJavaGlobalRef<jobject>(env, jcallback)));

Powered by Google App Engine
This is Rietveld 408576698