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

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

Issue 1214633008: SkyDemo should launch demos in their own windows (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
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 139325479f4b99107c7d409f32f0189f448f56bd..61723b390b1d8b776d55bad9072a09e26e5e5ecd 100644
--- a/sky/sdk/example/demo_launcher/lib/main.dart
+++ b/sky/sdk/example/demo_launcher/lib/main.dart
@@ -5,6 +5,7 @@
import 'dart:sky';
import 'package:mojom/intents/intents.mojom.dart';
+import 'package:sky/mojo/activity.dart' as activity;
import 'package:sky/mojo/asset_bundle.dart';
import 'package:sky/mojo/shell.dart' as shell;
import 'package:sky/painting/box_painter.dart';
@@ -38,6 +39,7 @@ void launch(String relativeUrl, String bundle) {
Intent intent = new Intent()
..action = 'android.intent.action.VIEW'
..component = component
+ ..flags = activity.MULTIPLE_TASK | activity.NEW_DOCUMENT
..url = url.toString();
if (bundle != null) {
@@ -47,8 +49,7 @@ void launch(String relativeUrl, String bundle) {
intent.stringExtras = [extra];
}
- shell.requestService(null, activityManager);
- activityManager.ptr.startActivity(intent);
+ activity.startActivity(intent);
}
class SkyDemo {

Powered by Google App Engine
This is Rietveld 408576698