| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 import 'dart:async'; | 5 import 'dart:async'; |
| 6 import 'dart:core'; | 6 import 'dart:core'; |
| 7 import 'package:mojo/public/dart/core.dart'; | 7 import 'package:mojo/core.dart'; |
| 8 import 'package:mojo/services/files/public/interfaces/file.mojom.dart' as files; | 8 import 'package:mojom/mojo/file.mojom.dart' as files; |
| 9 import 'package:mojo/services/files/public/interfaces/types.mojom.dart' | 9 import 'package:mojom/mojo/types.mojom.dart' as files; |
| 10 as files; | |
| 11 | 10 |
| 12 import 'terminal_display.dart'; | 11 import 'terminal_display.dart'; |
| 13 | 12 |
| 14 // This implements a |mojo.files.File| that acts like a (pseudo)terminal. Bytes | 13 // This implements a |mojo.files.File| that acts like a (pseudo)terminal. Bytes |
| 15 // written to the |File| will be read by this implementation and passed on to | 14 // written to the |File| will be read by this implementation and passed on to |
| 16 // the (Dart) |TerminalDisplay| (using |putChar()|). A read from the |File| will | 15 // the (Dart) |TerminalDisplay| (using |putChar()|). A read from the |File| will |
| 17 // be completed if/when |TerminalDisplay| makes a byte available (via | 16 // be completed if/when |TerminalDisplay| makes a byte available (via |
| 18 // |getChar()|). | 17 // |getChar()|). |
| 19 // TODO(vtl): This implementation is very incomplete. | 18 // TODO(vtl): This implementation is very incomplete. |
| 20 class TerminalFileImpl implements files.File { | 19 class TerminalFileImpl implements files.File { |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 return responseFactory(files.Error_UNIMPLEMENTED, null); | 122 return responseFactory(files.Error_UNIMPLEMENTED, null); |
| 124 } | 123 } |
| 125 | 124 |
| 126 @override | 125 @override |
| 127 Future ioctl( | 126 Future ioctl( |
| 128 int request, List<int> in_values, Function responseFactory) async { | 127 int request, List<int> in_values, Function responseFactory) async { |
| 129 // TODO(vtl) | 128 // TODO(vtl) |
| 130 return responseFactory(files.Error_UNIMPLEMENTED, null); | 129 return responseFactory(files.Error_UNIMPLEMENTED, null); |
| 131 } | 130 } |
| 132 } | 131 } |
| OLD | NEW |