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

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

Issue 10905049: Implementing window.createObjectURL* (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Incorporating review feedback. 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 b5f3864e29a456a43eabccd93c282b8133fd4f3b..bd27352c63e3df2e74e6ee4932502d146e0eb2fb 100644
--- a/lib/html/dart2js/html_dart2js.dart
+++ b/lib/html/dart2js/html_dart2js.dart
@@ -17426,6 +17426,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);
@@ -36352,6 +36359,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