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

Side by Side 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 import 'package:mojom/intents/intents.mojom.dart'; 5 import 'package:mojom/intents/intents.mojom.dart';
6 import 'package:sky/mojo/shell.dart' as shell; 6 import 'package:sky/mojo/shell.dart' as shell;
7 7
8 const int NEW_DOCUMENT = 0x00080000;
9 const int NEW_TASK = 0x10000000;
10 const int MULTIPLE_TASK = 0x08000000;
11
12 ActivityManagerProxy _initActivityManager() {
13 ActivityManagerProxy activityManager = new ActivityManagerProxy.unbound();
14 shell.requestService('mojo:sky_viewer', activityManager);
15 return activityManager;
16 }
17
18 final ActivityManagerProxy _activityManager = _initActivityManager();
19
8 void finishCurrentActivity() { 20 void finishCurrentActivity() {
9 ActivityManagerProxy activityManager = new ActivityManagerProxy.unbound(); 21 _activityManager.ptr.finishCurrentActivity();
10 shell.requestService('mojo:sky_viewer', activityManager); 22 }
11 activityManager.ptr.finishCurrentActivity(); 23
12 } 24 void startActivity(Intent intent) {
25 _activityManager.ptr.startActivity(intent);
26 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698