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

Unified Diff: sky/examples/shell/sensor.sky

Issue 980323003: Clean up examples directory (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 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 | « sky/examples/scrolling/scrolling.sky ('k') | sky/examples/style/block-layout.sky » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/examples/shell/sensor.sky
diff --git a/sky/examples/shell/sensor.sky b/sky/examples/shell/sensor.sky
deleted file mode 100644
index 80879a54ddd6dfa0a907f4315df95f4622f74a67..0000000000000000000000000000000000000000
--- a/sky/examples/shell/sensor.sky
+++ /dev/null
@@ -1,38 +0,0 @@
-<script>
-import '/sky/framework/shell.dart' as shell;
-import 'dart:sky';
-import 'package:sky/services/sensors/sensors.mojom.dart';
-
-class MyListener extends SensorListener {
- int count = 0;
-
- void onAccuracyChanged(int accuracy) {
- print("onAccuracyChanged $accuracy");
- }
-
- void onSensorChanged(SensorData data) {
- double value = data.values[0] + data.values[1] + data.values[2];
- if (value > 40.0) {
- document.querySelector('div').textContent =
- "Shake count " + (count++).toString();
- }
- }
-
- MyListener.unbound() {
- stub = new SensorListenerStub.unbound()
- ..delegate = this;
- }
-
- SensorListenerStub stub;
-}
-
-void main() {
- var sensorService = new SensorServiceProxy.unbound();
- shell.requestService(sensorService);
-
- var listener = new MyListener.unbound();
- sensorService.ptr.addListener(SensorType_ACCELEROMETER, listener.stub);
- listener.stub.listen();
-}
-</script>
-<div>Shake me.</div>
« no previous file with comments | « sky/examples/scrolling/scrolling.sky ('k') | sky/examples/style/block-layout.sky » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698