| Index: ui/snapshot/snapshot_android.cc
|
| diff --git a/ui/snapshot/snapshot_android.cc b/ui/snapshot/snapshot_android.cc
|
| index 557a325db03b1682b79613561520a3070ea4bfb0..f32ca461169c15f6c537d5cbd09a2ee5e246fec1 100644
|
| --- a/ui/snapshot/snapshot_android.cc
|
| +++ b/ui/snapshot/snapshot_android.cc
|
| @@ -23,14 +23,18 @@ namespace ui {
|
|
|
| bool GrabViewSnapshot(gfx::NativeView view,
|
| std::vector<unsigned char>* png_representation,
|
| - const gfx::Rect& snapshot_bounds) {
|
| - return GrabWindowSnapshot(
|
| - view->GetWindowAndroid(), png_representation, snapshot_bounds);
|
| + const gfx::Rect& snapshot_bounds,
|
| + SnapshotEncoding encoding,
|
| + SnapshotQuality quality) {
|
| + return GrabWindowSnapshot(view->GetWindowAndroid(), png_representation,
|
| + snapshot_bounds, encoding, quality);
|
| }
|
|
|
| bool GrabWindowSnapshot(gfx::NativeWindow window,
|
| std::vector<unsigned char>* png_representation,
|
| - const gfx::Rect& snapshot_bounds) {
|
| + const gfx::Rect& snapshot_bounds,
|
| + SnapshotEncoding encoding,
|
| + SnapshotQuality quality) {
|
| // Not supported in Android. Callers should fall back to the async version.
|
| return false;
|
| }
|
| @@ -79,21 +83,24 @@ void GrabWindowSnapshotAsync(
|
| gfx::NativeWindow window,
|
| const gfx::Rect& source_rect,
|
| scoped_refptr<base::TaskRunner> background_task_runner,
|
| - const GrabWindowSnapshotAsyncPNGCallback& callback) {
|
| - MakeAsyncCopyRequest(window,
|
| - source_rect,
|
| - base::Bind(&SnapshotAsync::EncodeCopyOutputResult,
|
| - callback,
|
| - background_task_runner));
|
| + const GrabWindowSnapshotAsyncEncodedCallback& callback,
|
| + SnapshotEncoding encoding,
|
| + SnapshotQuality quality) {
|
| + MakeAsyncCopyRequest(
|
| + window, source_rect,
|
| + base::Bind(&SnapshotAsync::EncodeCopyOutputResult, callback,
|
| + background_task_runner, encoding, quality));
|
| }
|
|
|
| void GrabViewSnapshotAsync(
|
| gfx::NativeView view,
|
| const gfx::Rect& source_rect,
|
| scoped_refptr<base::TaskRunner> background_task_runner,
|
| - const GrabWindowSnapshotAsyncPNGCallback& callback) {
|
| - GrabWindowSnapshotAsync(
|
| - view->GetWindowAndroid(), source_rect, background_task_runner, callback);
|
| + const GrabWindowSnapshotAsyncEncodedCallback& callback,
|
| + SnapshotEncoding encoding,
|
| + SnapshotQuality quality) {
|
| + GrabWindowSnapshotAsync(view->GetWindowAndroid(), source_rect,
|
| + background_task_runner, callback, encoding, quality);
|
| }
|
|
|
| } // namespace ui
|
|
|