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

Unified Diff: sky/engine/public/sky/sky_view.cc

Issue 1130353009: Teach SkyView how to load the main script (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 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
« no previous file with comments | « sky/engine/public/sky/sky_view.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/public/sky/sky_view.cc
diff --git a/sky/engine/public/sky/sky_view.cc b/sky/engine/public/sky/sky_view.cc
index 694f39f921474aaa448fec199922e638ab1035b8..8b365b24623c07b98122956700f5cc52e2990df2 100644
--- a/sky/engine/public/sky/sky_view.cc
+++ b/sky/engine/public/sky/sky_view.cc
@@ -5,6 +5,9 @@
#include "config.h"
#include "sky/engine/public/sky/sky_view.h"
+#include "sky/engine/core/script/dart_controller.h"
+#include "sky/engine/platform/weborigin/KURL.h"
+
namespace blink {
std::unique_ptr<SkyView> SkyView::Create() {
@@ -15,12 +18,17 @@ SkyView::SkyView() {
}
SkyView::~SkyView() {
+ if (dart_controller_)
+ dart_controller_->ClearForClose();
eseidel 2015/05/19 17:20:37 Why is this separate from the destructor?
abarth-chromium 2015/05/19 17:26:49 Because it thinks its part of a Frame and can be r
}
void SkyView::SetDisplayMetrics(const SkyDisplayMetrics& metrics) {
}
void SkyView::Load(const WebURL& url) {
+ dart_controller_.reset(new DartController);
+ dart_controller_->CreateIsolateFor(nullptr);
+ dart_controller_->LoadMainLibrary(url);
}
skia::RefPtr<SkPicture> SkyView::Paint() {
« no previous file with comments | « sky/engine/public/sky/sky_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698