Commit 9dfc681b authored by morrita@chromium.org's avatar morrita@chromium.org

Make PPAPI use 'new ProgressEvent' instead of initProgressEvent.

initProgressEvent is going away soon.

BUG=103194
TEST=cd native_client; ./scons chrome_browser_tests disable_dynamic_plugin_loading=1 chrome_browser_path=/path/to/your/chrome

Review URL: http://codereview.chromium.org/8488002
Patch from Dominic Cooney <dominicc@chromium.org>.

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110266 0039d316-1c4b-4281-b951-d872f2087c98
parent fb575bc7
...@@ -1946,11 +1946,13 @@ void Plugin::DispatchProgressEvent(int32_t result) { ...@@ -1946,11 +1946,13 @@ void Plugin::DispatchProgressEvent(int32_t result) {
static const char* kEventClosureJS = static const char* kEventClosureJS =
"(function(target, type, url," "(function(target, type, url,"
" lengthComputable, loadedBytes, totalBytes) {" " lengthComputable, loadedBytes, totalBytes) {"
" var progress_event = document.createEvent('ProgressEvent');" " var progress_event = new ProgressEvent(type, {"
" progress_event.initProgressEvent(type, false, true," " bubbles: false,"
" lengthComputable," " cancelable: true,"
" loadedBytes," " lengthComputable: lengthComputable,"
" totalBytes);" " loaded: loadedBytes,"
" total: totalBytes"
" });"
" progress_event.url = url;" " progress_event.url = url;"
" target.dispatchEvent(progress_event);" " target.dispatchEvent(progress_event);"
"})"; "})";
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment