| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 /** | 5 /** |
| 6 * Compiles Dart Web Components from within a Chrome extension. | 6 * Compiles Dart Web Components from within a Chrome extension. |
| 7 * The Chrome extension logic exists outside of Dart as Dart does not support | 7 * The Chrome extension logic exists outside of Dart as Dart does not support |
| 8 * Chrome extension APIs at this time. | 8 * Chrome extension APIs at this time. |
| 9 */ | 9 */ |
| 10 library dwc_browser; | 10 library dwc_browser; |
| 11 | 11 |
| 12 import 'dart:html'; | 12 import 'dart:html'; |
| 13 import 'dart:uri'; | 13 import 'dart:uri'; |
| 14 import 'package:web_components/src/compiler.dart'; | 14 import 'package:web_ui/src/compiler.dart'; |
| 15 import 'package:web_components/src/file_system.dart'; | 15 import 'package:web_ui/src/file_system.dart'; |
| 16 import 'package:web_components/src/file_system/browser.dart'; | 16 import 'package:web_ui/src/file_system/browser.dart'; |
| 17 import 'package:web_components/src/file_system/path.dart'; | 17 import 'package:web_ui/src/file_system/path.dart'; |
| 18 import 'package:web_components/src/messages.dart'; | 18 import 'package:web_ui/src/messages.dart'; |
| 19 import 'package:web_components/src/options.dart'; | 19 import 'package:web_ui/src/options.dart'; |
| 20 import 'package:web_components/src/utils.dart'; | 20 import 'package:web_ui/src/utils.dart'; |
| 21 import 'package:js/js.dart' as js; | 21 import 'package:js/js.dart' as js; |
| 22 | 22 |
| 23 FileSystem fileSystem; | 23 FileSystem fileSystem; |
| 24 | 24 |
| 25 void main() { | 25 void main() { |
| 26 js.scoped(() { | 26 js.scoped(() { |
| 27 js.context.setOnParseCallback(new js.Callback.many(parse)); | 27 js.context.setOnParseCallback(new js.Callback.many(parse)); |
| 28 }); | 28 }); |
| 29 } | 29 } |
| 30 | 30 |
| (...skipping 22 matching lines...) Expand all Loading... |
| 53 js.scoped(() { | 53 js.scoped(() { |
| 54 js.context.proxyMessages(sourcePagePort, | 54 js.context.proxyMessages(sourcePagePort, |
| 55 js.array(messages.messages.map( | 55 js.array(messages.messages.map( |
| 56 (m) => [m.level.name, m.toString()]))); | 56 (m) => [m.level.name, m.toString()]))); |
| 57 }); | 57 }); |
| 58 js.release(sourcePagePort); | 58 js.release(sourcePagePort); |
| 59 return ret; | 59 return ret; |
| 60 }); | 60 }); |
| 61 }, printTime: true); | 61 }, printTime: true); |
| 62 } | 62 } |
| OLD | NEW |