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

Side by Side Diff: examples/location/location.sky

Issue 1398973004: Move //mojo/services/X/public/... to //mojo/services/X/... (part 2). (Closed) Base URL: https://github.com/domokit/mojo.git@no_public_1
Patch Set: add missing copyright notices Created 5 years, 2 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 | « examples/location/geocoder_demo.js ('k') | examples/moterm_example_app/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!mojo mojo:sky_viewer 1 #!mojo mojo:sky_viewer
2 <sky> 2 <sky>
3 <import src="dart-library.sky" as="library" /> 3 <import src="dart-library.sky" as="library" />
4 <style> 4 <style>
5 location { font-size: 2em; margin: 1em; } 5 location { font-size: 2em; margin: 1em; }
6 </style> 6 </style>
7 <location>Getting location...</location> 7 <location>Getting location...</location>
8 <script> 8 <script>
9 import 'dart:async'; 9 import 'dart:async';
10 import 'dart:sky'; 10 import 'dart:sky';
11 11
12 import 'package:sky/framework/embedder.dart'; 12 import 'package:sky/framework/embedder.dart';
13 13
14 import 'package:mojo/services/location/public/interfaces/location_service.mojom. dart'; 14 import 'package:mojo/services/location/interfaces/location_service.mojom.dart';
15 15
16 main() async { 16 main() async {
17 var locationService = new LocationServiceProxy.unbound(); 17 var locationService = new LocationServiceProxy.unbound();
18 embedder.connectToService("mojo:location_service", locationService); 18 embedder.connectToService("mojo:location_service", locationService);
19 var location = await locationService.ptr.getNextLocation(0); 19 var location = await locationService.ptr.getNextLocation(0);
20 locationService.close(); 20 locationService.close();
21 document.querySelector('location').textContent = "Latitude: ${location.locatio n.latitude} "; 21 document.querySelector('location').textContent = "Latitude: ${location.locatio n.latitude} ";
22 document.querySelector('location').textContent += "Longitude: ${location.locat ion.longitude} "; 22 document.querySelector('location').textContent += "Longitude: ${location.locat ion.longitude} ";
23 } 23 }
24 </script> 24 </script>
25 </sky> 25 </sky>
OLDNEW
« no previous file with comments | « examples/location/geocoder_demo.js ('k') | examples/moterm_example_app/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698