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

Unified Diff: sky/sdk/lib/mojo/activity.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/lib/mojo/activity.dart
diff --git a/sky/sdk/lib/mojo/activity.dart b/sky/sdk/lib/mojo/activity.dart
index 5ddfc7db28af192d147ff4714a5e6814f3d19d0a..7abd84d06f95bd7bdcc1537dd14ce49b35411a36 100644
--- a/sky/sdk/lib/mojo/activity.dart
+++ b/sky/sdk/lib/mojo/activity.dart
@@ -5,8 +5,22 @@
import 'package:mojom/intents/intents.mojom.dart';
import 'package:sky/mojo/shell.dart' as shell;
+const int NEW_DOCUMENT = 0x00080000;
+const int NEW_TASK = 0x10000000;
+const int MULTIPLE_TASK = 0x08000000;
+
+ActivityManagerProxy _initActivityManager() {
+ ActivityManagerProxy activityManager = new ActivityManagerProxy.unbound();
+ shell.requestService('mojo:sky_viewer', activityManager);
+ return activityManager;
+}
+
+final ActivityManagerProxy _activityManager = _initActivityManager();
+
void finishCurrentActivity() {
- ActivityManagerProxy activityManager = new ActivityManagerProxy.unbound();
- shell.requestService('mojo:sky_viewer', activityManager);
- activityManager.ptr.finishCurrentActivity();
-}
+ _activityManager.ptr.finishCurrentActivity();
+}
+
+void startActivity(Intent intent) {
+ _activityManager.ptr.startActivity(intent);
+}

Powered by Google App Engine
This is Rietveld 408576698