Chromium Code Reviews| Index: runtime/lib/core_patch.dart |
| diff --git a/runtime/lib/core_patch.dart b/runtime/lib/core_patch.dart |
| index 2a45ae708efed16d1b8b4276978c5a8cd8b28de5..fc778c11ddc95a15445036ac44a282f26f4febac 100644 |
| --- a/runtime/lib/core_patch.dart |
| +++ b/runtime/lib/core_patch.dart |
| @@ -4,6 +4,7 @@ |
| import "dart:math"; |
| import "dart:typed_data"; |
| +import "dart:convert" show UTF8; |
|
Ivan Posva
2015/06/12 10:51:03
Not needed. Please remove.
|
| // Equivalent of calling FATAL from C++ code. |
| _fatal(msg) native "DartCore_fatal"; |
| @@ -205,3 +206,27 @@ class _SyncIterator implements Iterator { |
| } |
| } |
| } |
| + |
| +patch class Resource { |
| + /* patch */ const factory Resource(String uri) = _Resource; |
| +} |
| + |
| +class _Resource implements Resource { |
| + final String _location; |
| + |
| + /* patch */ const _Resource(String uri) : _location = uri; |
| + |
| + Uri get uri => Uri.base.resolve(_location); |
| + |
| + Stream<List<int>> openRead() { |
| + throw new UnimplementedError("openRead"); |
| + } |
| + |
| + Future<List<int>> readAsBytes() { |
| + throw new UnimplementedError("readAsBytes"); |
| + } |
| + |
| + Future<String> readAsString({Encoding encoding}) { |
| + throw new UnimplementedError("readAsString"); |
| + } |
| +} |