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

Unified Diff: sky/sdk/example/demo_launcher/lib/main.dart

Issue 1227663003: Make examples which do not yet support skyx still work in skyx mode. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 5 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/sdk/example/demo_launcher/lib/main.dart
diff --git a/sky/sdk/example/demo_launcher/lib/main.dart b/sky/sdk/example/demo_launcher/lib/main.dart
index 676465c6c55f0cb43d95eca7c3095e1cefef5743..75c0f46fe1fcd28e88fe0bac9a7134644f9aca6d 100644
--- a/sky/sdk/example/demo_launcher/lib/main.dart
+++ b/sky/sdk/example/demo_launcher/lib/main.dart
@@ -30,7 +30,11 @@ AssetBundle _initBundle() {
final AssetBundle _bundle = _initBundle();
void launch(String relativeUrl, String bundle) {
- Uri url = Uri.base.resolve(relativeUrl);
+ // TODO(eseidel): This is a hack to keep non-skyx examples working for now:
+ Uri productionBase = Uri.parse(
+ 'https://domokit.github.io/example/demo_launcher/lib/main.dart');
+ Uri base = rootBundle == null ? Uri.base : productionBase;
+ Uri url = base.resolve(relativeUrl);
activity.ComponentName component = new activity.ComponentName()
..packageName = 'org.domokit.sky.demo'
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698