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

Side by Side Diff: examples/dart/device_info/lib/main.dart

Issue 1375733004: -Add a mojo service to get video frames from the camera through an android service (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: remove stale files. 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
OLDNEW
1 #!mojo mojo:dart_content_handler 1 #!mojo mojo:dart_content_handler
2 // Copyright 2015 The Chromium Authors. All rights reserved. 2 // Copyright 2015 The Chromium Authors. All rights reserved.
3 // Use of this source code is governed by a BSD-style license that can be 3 // Use of this source code is governed by a BSD-style license that can be
4 // found in the LICENSE file. 4 // found in the LICENSE file.
5 5
6 import 'dart:async'; 6 import 'dart:async';
7 7
8 import 'package:mojo/application.dart'; 8 import 'package:mojo/application.dart';
9 import 'package:mojo/bindings.dart'; 9 import 'package:mojo/bindings.dart';
10 import 'package:mojo/core.dart'; 10 import 'package:mojo/core.dart';
11 import 'package:mojo_services/mojo/device_info.mojom.dart'; 11 import 'package:mojo_services/mojo/device_info.mojom.dart';
12 12
13 class DeviceInfoApp extends Application { 13 class DeviceInfoApp extends Application {
14 final DeviceInfoProxy _deviceInfo = new DeviceInfoProxy.unbound(); 14 final DeviceInfoProxy _deviceInfo = new DeviceInfoProxy.unbound();
15
alhaad1 2015/10/02 06:33:27 Stray change?
gautham 2015/10/02 22:29:11 Done.
16 DeviceInfoApp.fromHandle(MojoHandle handle) : super.fromHandle(handle); 15 DeviceInfoApp.fromHandle(MojoHandle handle) : super.fromHandle(handle);
17
18 Future initialize(List<String> args, String url) async { 16 Future initialize(List<String> args, String url) async {
19 connectToService("mojo:device_info", _deviceInfo); 17 connectToService("mojo:device_info", _deviceInfo);
20 print(await _deviceInfo.ptr.getDeviceType()); 18 print(await _deviceInfo.ptr.getDeviceType());
21 _deviceInfo.close(); 19 _deviceInfo.close();
22 close(); 20 close();
23 } 21 }
24 } 22 }
25 23
26 main(List args) { 24 main(List args) {
27 MojoHandle appHandle = new MojoHandle(args[0]); 25 MojoHandle appHandle = new MojoHandle(args[0]);
28 new DeviceInfoApp.fromHandle(appHandle); 26 new DeviceInfoApp.fromHandle(appHandle);
29 } 27 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698