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

Side by Side Diff: sky/framework/debug/shake-to-reload.sky

Issue 962383003: Make shake-to-reload actually work (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 9 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
« no previous file with comments | « sky/examples/touch-demo.sky ('k') | sky/shell/java_service_provider.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <script> 1 <script>
2 import '/sky/framework/shell.dart' as shell; 2 import '/sky/framework/shell.dart' as shell;
3 import 'dart:sky'; 3 import 'dart:sky';
4 import 'package:sky/services/sensors/sensors.mojom.dart'; 4 import 'package:sky/services/sensors/sensors.mojom.dart';
5 5
6 // TODO(abarth): We should factor this out into a kinemetics library. 6 // TODO(abarth): We should factor this out into a kinematics library.
7 class _ShakeDetector extends SensorListener { 7 class _ShakeDetector extends SensorListener {
8 _ShakeDetector() { 8 _ShakeDetector() {
9 SensorServiceProxy sensorService = new SensorServiceProxy.unbound(); 9 SensorServiceProxy sensorService = new SensorServiceProxy.unbound();
10 shell.requestService(sensorService); 10 shell.requestService(sensorService);
11 11
12 _stub = new SensorListenerStub.unbound() 12 _stub = new SensorListenerStub.unbound()
13 ..delegate = this; 13 ..delegate = this;
14 sensorService.ptr.addListener(SensorType_ACCELEROMETER, _stub); 14 sensorService.ptr.addListener(SensorType_ACCELEROMETER, _stub);
15 _stub.listen(); 15 _stub.listen();
16 } 16 }
(...skipping 17 matching lines...) Expand all
34 bool isShaking = false; 34 bool isShaking = false;
35 SensorListenerStub _stub; 35 SensorListenerStub _stub;
36 } 36 }
37 37
38 _ShakeDetector _detector; 38 _ShakeDetector _detector;
39 39
40 void _init(_) { 40 void _init(_) {
41 _detector = new _ShakeDetector(); 41 _detector = new _ShakeDetector();
42 } 42 }
43 </script> 43 </script>
OLDNEW
« no previous file with comments | « sky/examples/touch-demo.sky ('k') | sky/shell/java_service_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698