| OLD | NEW |
| 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 } |
| OLD | NEW |