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

Unified Diff: sky/sdk/example/rendering/interactive_flex.dart

Issue 1214073014: Back button should kill interactive flex app (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/rendering/interactive_flex.dart
diff --git a/sky/sdk/example/rendering/interactive_flex.dart b/sky/sdk/example/rendering/interactive_flex.dart
index 6553c8bf0462418bb57d8f4e9512e235cb08d6d9..398a14d6eb02c6ca9e11a34dc7ad859606452b48 100644
--- a/sky/sdk/example/rendering/interactive_flex.dart
+++ b/sky/sdk/example/rendering/interactive_flex.dart
@@ -5,7 +5,9 @@
import 'dart:sky';
import 'dart:math' as math;
+import 'package:mojom/intents/intents.mojom.dart';
import 'package:sky/mojo/net/image_cache.dart' as image_cache;
+import 'package:sky/mojo/shell.dart' as shell;
import 'package:sky/painting/text_style.dart';
import 'package:sky/rendering/box.dart';
import 'package:sky/rendering/flex.dart';
@@ -45,6 +47,11 @@ void handleEvent(event) {
image.growth = math.max(0.0, image.growth + event.x - touches[event.pointer].x);
touches[event.pointer] = new Touch(event.x, event.y);
}
+ if (event.type == "back") {
+ ActivityManagerProxy activityManager = new ActivityManagerProxy.unbound();
+ shell.requestService('mojo:sky_viewer', activityManager);
+ activityManager.ptr.finishCurrentActivity();
+ }
abarth-chromium 2015/07/07 18:10:26 Should we factor this into a library since we have
jackson 2015/07/07 19:17:30 Done.
}
void main() {
« 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