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

Side by Side Diff: sdk/lib/html/dart2js/html_dart2js.dart

Issue 11308130: Rename onSuccess to onComplete in HttpRequest. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 1 month 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
OLDNEW
1 library html; 1 library html;
2 2
3 import 'dart:isolate'; 3 import 'dart:isolate';
4 import 'dart:json'; 4 import 'dart:json';
5 import 'dart:svg' as svg; 5 import 'dart:svg' as svg;
6 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 6 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
7 // for details. All rights reserved. Use of this source code is governed by a 7 // for details. All rights reserved. Use of this source code is governed by a
8 // BSD-style license that can be found in the LICENSE file. 8 // BSD-style license that can be found in the LICENSE file.
9 9
10 // DO NOT EDIT 10 // DO NOT EDIT
(...skipping 9814 matching lines...) Expand 10 before | Expand all | Expand 10 after
9825 class HtmlElement extends Element implements Element native "*HTMLHtmlElement" { 9825 class HtmlElement extends Element implements Element native "*HTMLHtmlElement" {
9826 9826
9827 factory HtmlElement() => document.$dom_createElement("html"); 9827 factory HtmlElement() => document.$dom_createElement("html");
9828 } 9828 }
9829 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 9829 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
9830 // for details. All rights reserved. Use of this source code is governed by a 9830 // for details. All rights reserved. Use of this source code is governed by a
9831 // BSD-style license that can be found in the LICENSE file. 9831 // BSD-style license that can be found in the LICENSE file.
9832 9832
9833 9833
9834 class HttpRequest extends EventTarget native "*XMLHttpRequest" { 9834 class HttpRequest extends EventTarget native "*XMLHttpRequest" {
9835 factory HttpRequest.get(String url, onSuccess(HttpRequest request)) => 9835 factory HttpRequest.get(String url, onComplete(HttpRequest request)) =>
9836 _HttpRequestFactoryProvider.createHttpRequest_get(url, onSuccess); 9836 _HttpRequestFactoryProvider.createHttpRequest_get(url, onComplete);
9837 9837
9838 factory HttpRequest.getWithCredentials(String url, onSuccess(HttpRequest reque st)) => 9838 factory HttpRequest.getWithCredentials(String url,
9839 _HttpRequestFactoryProvider.createHttpRequest_getWithCredentials(url, onSu ccess); 9839 onComplete(HttpRequest request)) =>
9840 _HttpRequestFactoryProvider.createHttpRequest_getWithCredentials(url,
9841 onComplete);
9840 9842
9841 9843
9842 factory HttpRequest() => _HttpRequestFactoryProvider.createHttpRequest(); 9844 factory HttpRequest() => _HttpRequestFactoryProvider.createHttpRequest();
9843 9845
9844 /** 9846 /**
9845 * @domName EventTarget.addEventListener, EventTarget.removeEventListener, Eve ntTarget.dispatchEvent 9847 * @domName EventTarget.addEventListener, EventTarget.removeEventListener, Eve ntTarget.dispatchEvent
9846 */ 9848 */
9847 HttpRequestEvents get on => 9849 HttpRequestEvents get on =>
9848 new HttpRequestEvents(this); 9850 new HttpRequestEvents(this);
9849 9851
(...skipping 11451 matching lines...) Expand 10 before | Expand all | Expand 10 after
21301 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 21303 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
21302 // for details. All rights reserved. Use of this source code is governed by a 21304 // for details. All rights reserved. Use of this source code is governed by a
21303 // BSD-style license that can be found in the LICENSE file. 21305 // BSD-style license that can be found in the LICENSE file.
21304 21306
21305 21307
21306 class _HttpRequestFactoryProvider { 21308 class _HttpRequestFactoryProvider {
21307 static HttpRequest createHttpRequest() => 21309 static HttpRequest createHttpRequest() =>
21308 JS('HttpRequest', 'new XMLHttpRequest()'); 21310 JS('HttpRequest', 'new XMLHttpRequest()');
21309 21311
21310 static HttpRequest createHttpRequest_get(String url, 21312 static HttpRequest createHttpRequest_get(String url,
21311 onSuccess(HttpRequest request)) => 21313 onComplete(HttpRequest request)) =>
21312 _HttpRequestUtils.get(url, onSuccess, false); 21314 _HttpRequestUtils.get(url, onComplete, false);
21313 21315
21314 static HttpRequest createHttpRequest_getWithCredentials(String url, 21316 static HttpRequest createHttpRequest_getWithCredentials(String url,
21315 onSuccess(HttpRequest request)) => 21317 onComplete(HttpRequest request)) =>
21316 _HttpRequestUtils.get(url, onSuccess, true); 21318 _HttpRequestUtils.get(url, onComplete, true);
21317 } 21319 }
21318 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 21320 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
21319 // for details. All rights reserved. Use of this source code is governed by a 21321 // for details. All rights reserved. Use of this source code is governed by a
21320 // BSD-style license that can be found in the LICENSE file. 21322 // BSD-style license that can be found in the LICENSE file.
21321 21323
21322 21324
21323 class _IceCandidateFactoryProvider { 21325 class _IceCandidateFactoryProvider {
21324 static IceCandidate createIceCandidate(String label, String candidateLine) => 21326 static IceCandidate createIceCandidate(String label, String candidateLine) =>
21325 JS('IceCandidate', 'new IceCandidate(#,#)', label, candidateLine); 21327 JS('IceCandidate', 'new IceCandidate(#,#)', label, candidateLine);
21326 } 21328 }
(...skipping 3792 matching lines...) Expand 10 before | Expand all | Expand 10 after
25119 if (length < 0) throw new ArgumentError('length'); 25121 if (length < 0) throw new ArgumentError('length');
25120 if (start < 0) throw new RangeError.value(start); 25122 if (start < 0) throw new RangeError.value(start);
25121 int end = start + length; 25123 int end = start + length;
25122 if (end > a.length) throw new RangeError.value(end); 25124 if (end > a.length) throw new RangeError.value(end);
25123 for (int i = start; i < end; i++) { 25125 for (int i = start; i < end; i++) {
25124 accumulator.add(a[i]); 25126 accumulator.add(a[i]);
25125 } 25127 }
25126 return accumulator; 25128 return accumulator;
25127 } 25129 }
25128 } 25130 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698