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

Unified Diff: ppapi/native_client/src/trusted/plugin/plugin.cc

Issue 8488002: Make PPAPI use 'new ProgressEvent' instead of initProgressEvent. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/native_client/src/trusted/plugin/plugin.cc
diff --git a/ppapi/native_client/src/trusted/plugin/plugin.cc b/ppapi/native_client/src/trusted/plugin/plugin.cc
index 24a0157d35cf924522be5be73671e7af74a0a789..589de9f3bc01bbc53154722e2e2ec6250e49a22f 100644
--- a/ppapi/native_client/src/trusted/plugin/plugin.cc
+++ b/ppapi/native_client/src/trusted/plugin/plugin.cc
@@ -1975,11 +1975,13 @@ void Plugin::DispatchProgressEvent(int32_t result) {
static const char* kEventClosureJS =
"(function(target, type, url,"
" lengthComputable, loadedBytes, totalBytes) {"
- " var progress_event = document.createEvent('ProgressEvent');"
- " progress_event.initProgressEvent(type, false, true,"
- " lengthComputable,"
- " loadedBytes,"
- " totalBytes);"
+ " var progress_event = new ProgressEvent(type, {"
+ " bubbles: false,"
polina 2011/11/07 19:42:06 this is so much easier to read!
+ " cancelable: true,"
+ " lengthComputable: lengthComputable,"
+ " loaded: loadedBytes,"
+ " total: totalBytes"
+ " });"
" progress_event.url = url;"
" target.dispatchEvent(progress_event);"
"})";
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698