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

Side by Side Diff: sdk/lib/html/src/dart2js_FactoryProviders.dart

Issue 11280103: Splitting out the Audio library. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Adding missing lib registrations Created 8 years 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 | Annotate | Revision Log
« no previous file with comments | « sdk/lib/html/scripts/systemhtml.py ('k') | sdk/lib/html/src/dartium_FactoryProviders.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 part of html; 5 part of html;
6 6
7 class _AudioContextFactoryProvider {
8
9 static AudioContext createAudioContext() {
10 return JS('AudioContext',
11 'new (window.AudioContext || window.webkitAudioContext)()');
12 }
13 }
14
15 class _PointFactoryProvider { 7 class _PointFactoryProvider {
16 static Point createPoint(num x, num y) => 8 static Point createPoint(num x, num y) =>
17 JS('Point', 'new WebKitPoint(#, #)', x, y); 9 JS('Point', 'new WebKitPoint(#, #)', x, y);
18 } 10 }
19 11
20 class _WebSocketFactoryProvider { 12 class _WebSocketFactoryProvider {
21 static WebSocket createWebSocket(String url) => 13 static WebSocket createWebSocket(String url) =>
22 JS('WebSocket', 'new WebSocket(#)', url); 14 JS('WebSocket', 'new WebSocket(#)', url);
23 } 15 }
24 16
25 class _TextFactoryProvider { 17 class _TextFactoryProvider {
26 static Text createText(String data) => 18 static Text createText(String data) =>
27 JS('Text', 'document.createTextNode(#)', data); 19 JS('Text', 'document.createTextNode(#)', data);
28 } 20 }
OLDNEW
« no previous file with comments | « sdk/lib/html/scripts/systemhtml.py ('k') | sdk/lib/html/src/dartium_FactoryProviders.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698