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

Unified Diff: ios/web/public/web_state/web_state.h

Issue 2945213002: [ios] Snapshot for WebState (Closed)
Patch Set: Address comments Created 3 years, 6 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 | « ios/web/public/test/fakes/test_web_state.mm ('k') | ios/web/web_state/web_state_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/web/public/web_state/web_state.h
diff --git a/ios/web/public/web_state/web_state.h b/ios/web/public/web_state/web_state.h
index 6974f523942f2691752762d1a997bb86f4d2338b..8335bb8545ff37d38ce5963c23aab69f0801057a 100644
--- a/ios/web/public/web_state/web_state.h
+++ b/ios/web/public/web_state/web_state.h
@@ -35,6 +35,10 @@ class DictionaryValue;
class Value;
}
+namespace gfx {
+class Image;
+}
+
namespace web {
class BrowserState;
@@ -248,6 +252,14 @@ class WebState : public base::SupportsUserData {
// CreateParams::created_with_opener for more details.
virtual bool HasOpener() const = 0;
+ // Callback used to handle snapshots. The parameter is the snapshot image.
+ typedef base::Callback<void(const gfx::Image&)> SnapshotCallback;
+
+ // Takes a snapshot of this WebState with |target_size|. |callback| is
+ // asynchronously invoked after performing the snapshot.
+ virtual void TakeSnapshot(const SnapshotCallback& callback,
+ CGSize target_size) const = 0;
+
protected:
friend class WebStateObserver;
friend class WebStatePolicyDecider;
« no previous file with comments | « ios/web/public/test/fakes/test_web_state.mm ('k') | ios/web/web_state/web_state_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698