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

Unified Diff: ui/snapshot/snapshot_aura.h

Issue 2854543002: Block incognito browser windows for voice interaction. (Closed)
Patch Set: address review comments Created 3 years, 7 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: ui/snapshot/snapshot_aura.h
diff --git a/ui/snapshot/snapshot_aura.h b/ui/snapshot/snapshot_aura.h
index 425dcf6c363224df3128272cf9eef8f2be234fa4..2c5429cef1d192837bf116fb630f087d52a36137 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,16 @@ SNAPSHOT_EXPORT void GrabWindowSnapshotAsyncAura(
const gfx::Rect& source_rect,
const GrabWindowSnapshotAsyncCallback& callback);
+using GrabLayerSnapshotCallback =
+ base::Callback<void(const gfx::Image& snapshot)>;
+
+// Grabs a snapshot of a |layer| and all its descendants.
+// |source_rect| is the bounds of the snapshot content relative to |layer|.
+SNAPSHOT_EXPORT void GrabLayerSnapshotAsync(
+ Layer* layer,
+ const gfx::Rect& source_rect,
+ const GrabLayerSnapshotCallback& callback);
+
} // namespace ui
#endif // UI_SNAPSHOT_SNAPSHOT_AURA_H_
« no previous file with comments | « chrome/browser/chromeos/arc/voice_interaction/arc_voice_interaction_framework_service.cc ('k') | ui/snapshot/snapshot_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698