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

Unified Diff: sky/sdk/lib/mojo/asset_bundle.dart

Issue 1208273003: Stocks.apk should have icons when run offline (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/engine/bindings/sky_internals.dart ('k') | sky/sdk/lib/widgets/icon.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/sdk/lib/mojo/asset_bundle.dart
diff --git a/sky/sdk/lib/mojo/asset_bundle.dart b/sky/sdk/lib/mojo/asset_bundle.dart
index 7aa49c48977ce17a7ad626311d4ec14fbaf0ba6c..7d7059dae620140b63ab1237da375a218f7c7373 100644
--- a/sky/sdk/lib/mojo/asset_bundle.dart
+++ b/sky/sdk/lib/mojo/asset_bundle.dart
@@ -4,6 +4,7 @@
import 'dart:async';
import 'dart:sky' as sky;
+import "dart:sky.internals" as internals;
import 'package:mojo/core.dart' as core;
import 'package:mojom/mojo/asset_bundle/asset_bundle.mojom.dart';
@@ -66,3 +67,15 @@ class MojoAssetBundle extends AssetBundle {
});
}
}
+
+AssetBundle _initRootBundle() {
+ try {
+ AssetBundleProxy bundle = new AssetBundleProxy.fromHandle(
+ new core.MojoHandle(internals.takeRootBundleHandle()));
+ return new MojoAssetBundle(bundle);
+ } catch (e) {
+ return null;
+ }
+}
+
+final AssetBundle rootBundle = _initRootBundle();
« no previous file with comments | « sky/engine/bindings/sky_internals.dart ('k') | sky/sdk/lib/widgets/icon.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698