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

Unified Diff: sdk/lib/html/dart2js/html_dart2js.dart

Issue 12039026: Reverting 17420 "Speech recognition APIs" which broke dartium. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
Download patch
« no previous file with comments | « no previous file | sdk/lib/html/dartium/html_dartium.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/html/dart2js/html_dart2js.dart
diff --git a/sdk/lib/html/dart2js/html_dart2js.dart b/sdk/lib/html/dart2js/html_dart2js.dart
index 156573f76ef50732d662d7b6437c54503657b90b..d433cbf83736b7a432d4d421767c053c747b93ff 100644
--- a/sdk/lib/html/dart2js/html_dart2js.dart
+++ b/sdk/lib/html/dart2js/html_dart2js.dart
@@ -10086,25 +10086,8 @@ class Event native "*Event" {
//
// Contrary to JS, we default canBubble and cancelable to true, since that's
// what people want most of the time anyway.
- factory Event(String type,
- [bool canBubble = true, bool cancelable = true]) {
- return new Event.type('Event', type, canBubble, cancelable);
- }
-
- /**
- * Creates a new Event object of the specified type.
- *
- * This is analogous to document.createEvent.
- * Normally events should be created via their constructors, if available.
- *
- * var e = new Event.type('MouseEvent', 'mousedown', true, true);
- */
- factory Event.type(String eventType, String name, [bool canBubble = true,
- bool cancelable = true]) {
- final Event e = document.$dom_createEvent(eventType);
- e.$dom_initEvent(name, canBubble, cancelable);
- return e;
- }
+ factory Event(String type, [bool canBubble = true, bool cancelable = true]) =>
+ _EventFactoryProvider.createEvent(type, canBubble, cancelable);
static const int AT_TARGET = 2;
@@ -20378,15 +20361,14 @@ class SpeechInputResult native "*SpeechInputResult" {
@DomName('SpeechInputResult.utterance')
final String utterance;
}
-// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
+
@DocsEditable
@DomName('SpeechRecognition')
-@SupportedBrowser(SupportedBrowser.CHROME, '25')
-@Experimental()
class SpeechRecognition extends EventTarget native "*SpeechRecognition" {
@DocsEditable
@@ -20435,9 +20417,7 @@ class SpeechRecognition extends EventTarget native "*SpeechRecognition" {
@DocsEditable
factory SpeechRecognition() => SpeechRecognition._create();
-
- /// Checks if this type is supported on the current platform.
- static bool get supported => JS('bool', '!!(window.SpeechRecognition || window.webkitSpeechRecognition)');
+ static SpeechRecognition _create() => JS('SpeechRecognition', 'new SpeechRecognition()');
@DocsEditable
@DomName('EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent')
@@ -20534,11 +20514,6 @@ class SpeechRecognition extends EventTarget native "*SpeechRecognition" {
@DocsEditable
@DomName('SpeechRecognition.start')
Stream<Event> get onStart => startEvent.forTarget(this);
-
- static SpeechRecognition _create() {
- return JS('SpeechRecognition',
- 'new (window.SpeechRecognition || window.webkitSpeechRecognition)()');
- }
}
@DocsEditable
@@ -20587,8 +20562,6 @@ class SpeechRecognitionEvents extends Events {
@DocsEditable
@DomName('SpeechRecognitionAlternative')
-@SupportedBrowser(SupportedBrowser.CHROME, '25')
-@Experimental()
class SpeechRecognitionAlternative native "*SpeechRecognitionAlternative" {
@DocsEditable
@@ -20607,8 +20580,6 @@ class SpeechRecognitionAlternative native "*SpeechRecognitionAlternative" {
@DocsEditable
@DomName('SpeechRecognitionError')
-@SupportedBrowser(SupportedBrowser.CHROME, '25')
-@Experimental()
class SpeechRecognitionError extends Event native "*SpeechRecognitionError" {
@DocsEditable
@@ -20627,8 +20598,6 @@ class SpeechRecognitionError extends Event native "*SpeechRecognitionError" {
@DocsEditable
@DomName('SpeechRecognitionEvent')
-@SupportedBrowser(SupportedBrowser.CHROME, '25')
-@Experimental()
class SpeechRecognitionEvent extends Event native "*SpeechRecognitionEvent" {
@DocsEditable
@@ -20659,8 +20628,6 @@ class SpeechRecognitionEvent extends Event native "*SpeechRecognitionEvent" {
@DocsEditable
@DomName('SpeechRecognitionResult')
-@SupportedBrowser(SupportedBrowser.CHROME, '25')
-@Experimental()
class SpeechRecognitionResult native "*SpeechRecognitionResult" {
@DocsEditable
« no previous file with comments | « no previous file | sdk/lib/html/dartium/html_dartium.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698