OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 library mojo_builtin; | 5 library mojo_builtin; |
6 | 6 |
7 import 'dart:async'; | 7 import 'dart:async'; |
8 import 'dart:convert'; | 8 import 'dart:convert'; |
9 import 'dart:mojo.internal'; | 9 import 'dart:mojo.internal'; |
10 | 10 |
(...skipping 19 matching lines...) Expand all Loading... |
30 | 30 |
31 | 31 |
32 Uri _uriBase() { | 32 Uri _uriBase() { |
33 return _entryPointScript.resolve('.'); | 33 return _entryPointScript.resolve('.'); |
34 } | 34 } |
35 | 35 |
36 _getUriBaseClosure() => _uriBase; | 36 _getUriBaseClosure() => _uriBase; |
37 | 37 |
38 _setupHooks() { | 38 _setupHooks() { |
39 VMLibraryHooks.eventHandlerSendData = MojoHandleWatcher.timer; | 39 VMLibraryHooks.eventHandlerSendData = MojoHandleWatcher.timer; |
| 40 VMLibraryHooks.timerMillisecondClock = MojoCoreNatives.timerMillisecondClock; |
40 } | 41 } |
41 | 42 |
42 String _rawCwd; | 43 String _rawCwd; |
43 Uri _cachedWorkingDirectory; | 44 Uri _cachedWorkingDirectory; |
44 Uri get _workingDirectory { | 45 Uri get _workingDirectory { |
45 if (_cachedWorkingDirectory != null) { | 46 if (_cachedWorkingDirectory != null) { |
46 return _cachedWorkingDirectory; | 47 return _cachedWorkingDirectory; |
47 } | 48 } |
48 _rawCwd = _enforceTrailingSlash(_rawCwd); | 49 _rawCwd = _enforceTrailingSlash(_rawCwd); |
49 _cachedWorkingDirectory = new Uri(scheme: 'file', path: _rawCwd); | 50 _cachedWorkingDirectory = new Uri(scheme: 'file', path: _rawCwd); |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 _rawCwd = cwd; | 111 _rawCwd = cwd; |
111 } | 112 } |
112 | 113 |
113 _setPackageRoot(String packageRoot) { | 114 _setPackageRoot(String packageRoot) { |
114 _rawPackageRoot = packageRoot; | 115 _rawPackageRoot = packageRoot; |
115 } | 116 } |
116 | 117 |
117 _resolveScriptUri(String scriptName) { | 118 _resolveScriptUri(String scriptName) { |
118 _rawScriptName = scriptName; | 119 _rawScriptName = scriptName; |
119 } | 120 } |
OLD | NEW |