Chromium Code Reviews| Index: ui/snapshot/snapshot_aura.h |
| diff --git a/ui/snapshot/snapshot_aura.h b/ui/snapshot/snapshot_aura.h |
| index 425dcf6c363224df3128272cf9eef8f2be234fa4..bca6a1943c872cf4f3d38194eb0221c5e81dd99e 100644 |
| --- a/ui/snapshot/snapshot_aura.h |
| +++ b/ui/snapshot/snapshot_aura.h |
| @@ -9,6 +9,8 @@ |
| namespace ui { |
| +class Layer; |
| + |
| // These functions are identical to those in snapshot.h, except they're |
| // guaranteed to read the frame using an Aura CopyOutputRequest and not the |
| // native windowing system. source_rect and target_size are in DIP. |
| @@ -25,6 +27,14 @@ SNAPSHOT_EXPORT void GrabWindowSnapshotAsyncAura( |
| const gfx::Rect& source_rect, |
| const GrabWindowSnapshotAsyncCallback& callback); |
| +using GrabLayerSnapshotCallback = |
| + base::Callback<void(const gfx::Image& snapshot)>; |
| + |
| +SNAPSHOT_EXPORT void GrabLayerSnapshotAsync( |
|
sky
2017/05/17 14:48:30
Please add description and use OnceCallback.
Muyuan
2017/05/17 19:25:35
I'm reusing the function in MakeAsyncCopyRequest,
|
| + Layer* layer, |
| + const gfx::Rect& source_rect, |
| + const GrabLayerSnapshotCallback& callback); |
| + |
| } // namespace ui |
| #endif // UI_SNAPSHOT_SNAPSHOT_AURA_H_ |