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

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

Issue 10915128: Implementing window.createObjectURL* (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Disabling test on IE since it's not supported on IE9. Created 8 years, 3 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 | « lib/dom/templates/html/interface/interface_Window.darttemplate ('k') | lib/html/dartium/html_dartium.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/html/dart2js/html_dart2js.dart
diff --git a/lib/html/dart2js/html_dart2js.dart b/lib/html/dart2js/html_dart2js.dart
index a98bb1e5bf25d44f513d19f2ff92036ab9917f93..bc706dfdf5e5f5f89d45c02322554523717303bd 100644
--- a/lib/html/dart2js/html_dart2js.dart
+++ b/lib/html/dart2js/html_dart2js.dart
@@ -17471,6 +17471,13 @@ class _WindowImpl extends _EventTargetImpl implements Window native "@*DOMWindow
localStorage['dart-port:$name'] = JSON.stringify(serialized);
}
+ String createObjectUrl(object) native '''
+ return (window.URL || window.webkitURL).createObjectURL(object)
+ ''';
+
+ void revokeObjectUrl(String objectUrl) native '''
+ (window.URL || window.webkitURL).revokeObjectURL(objectUrl)
+ ''';
_WindowEventsImpl get on() =>
new _WindowEventsImpl(this);
@@ -36439,6 +36446,16 @@ interface Window extends EventTarget {
IDBFactory get indexedDB();
+ /**
+ * Creates a new object URL for the specified object. The URL will be
+ * available until revokeObjectUrl is called.
+ * [object] can be a Blob, MediaStream or MediaSource.
+ */
+ String createObjectUrl(object);
+
+ /** @domName DOMURL.revokeObjectURL */
+ void revokeObjectUrl(String objectUrl);
+
/**
* @domName EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent
« no previous file with comments | « lib/dom/templates/html/interface/interface_Window.darttemplate ('k') | lib/html/dartium/html_dartium.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698