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

Unified Diff: sky/shell/ui/engine.cc

Issue 1212623002: Support snapshots in sky_shell (again) (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 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 | « sky/shell/ui/engine.h ('k') | sky/tools/packager/loader.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/shell/ui/engine.cc
diff --git a/sky/shell/ui/engine.cc b/sky/shell/ui/engine.cc
index 6e35f098aaef2ad7e0be9396723519b5250d503b..b75b731656b66529cdfc7d835ffe32f66cbfc39e 100644
--- a/sky/shell/ui/engine.cc
+++ b/sky/shell/ui/engine.cc
@@ -218,8 +218,12 @@ void Engine::RunFromFile(const mojo::String& main,
RunFromLibrary(main);
}
-void Engine::RunFromSnapshot(mojo::ScopedDataPipeConsumerHandle snapshot) {
- // TODO(abarth): Implement.
+void Engine::RunFromSnapshot(const mojo::String& url,
+ mojo::ScopedDataPipeConsumerHandle snapshot) {
+ CloseWebViewIfNeeded();
+ sky_view_ = blink::SkyView::Create(this);
+ sky_view_->RunFromSnapshot(blink::WebString::fromUTF8(url), snapshot.Pass());
+ UpdateSkyViewSize();
}
void Engine::LoadUsingWebView(const mojo::String& mojo_url) {
« no previous file with comments | « sky/shell/ui/engine.h ('k') | sky/tools/packager/loader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698