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

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

Issue 2592983002: [devtools] Support different encodings for Page.CaptureScreenshot. (Closed)
Patch Set: Disabled test on MacOS >=10.11, added ref to bug. 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
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/screenshot_testing/screenshot_tester.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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)));
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/screenshot_testing/screenshot_tester.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698