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

Unified Diff: ios/web/public/test/fakes/test_web_state.mm

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.h ('k') | ios/web/public/web_state/web_state.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/web/public/test/fakes/test_web_state.mm
diff --git a/ios/web/public/test/fakes/test_web_state.mm b/ios/web/public/test/fakes/test_web_state.mm
index 9c268874967e742a94a6ae680562f19ed78fccb5..97b631d3edb43872d941af58fee98f34b2277666 100644
--- a/ios/web/public/test/fakes/test_web_state.mm
+++ b/ios/web/public/test/fakes/test_web_state.mm
@@ -6,9 +6,12 @@
#include <stdint.h>
+#include "base/bind.h"
#include "base/callback.h"
+#include "base/threading/sequenced_task_runner_handle.h"
#import "ios/web/public/web_state/ui/crw_content_view.h"
#include "ios/web/public/web_state/web_state_observer.h"
+#include "ui/gfx/image/image.h"
#if !defined(__has_feature) || !__has_feature(objc_arc)
#error "This file requires ARC support."
@@ -230,6 +233,12 @@ bool TestWebState::HasOpener() const {
return false;
}
+void TestWebState::TakeSnapshot(const SnapshotCallback& callback,
+ CGSize target_size) const {
+ base::SequencedTaskRunnerHandle::Get()->PostTask(
+ FROM_HERE, base::Bind(callback, gfx::Image()));
+}
+
base::WeakPtr<WebState> TestWebState::AsWeakPtr() {
NOTREACHED();
return base::WeakPtr<WebState>();
« no previous file with comments | « ios/web/public/test/fakes/test_web_state.h ('k') | ios/web/public/web_state/web_state.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698