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

Side by Side Diff: ppapi/examples/pluginfs/pluginfs.js

Issue 77813004: [WIP] PluginPrivateFileSystem example (won't commit) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ppapi/examples/pluginfs/pluginfs.html ('k') | ppapi/ppapi_tests.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 function StartRequest() { 5 function StartRequest() {
6 var plugin = document.getElementById("plugin"); 6 var plugin = document.getElementById("plugin");
7 var filename = document.getElementById("filename").value; 7 var filename = document.getElementById("filename").value;
8 plugin.postMessage(filename); 8 plugin.postMessage(filename);
9 } 9 }
10 10
11 function HandleMessage(message_event) { 11 function HandleMessage(message_event) {
12 document.getElementById("content").value = message_event.data; 12 document.getElementById("content").value = message_event.data;
13 } 13 }
14 14
15 document.addEventListener('DOMContentLoaded', function () { 15 document.addEventListener('DOMContentLoaded', function () {
16 // Attach a listener for the message event. This must happen after the plugin 16 // Attach a listener for the message event. This must happen after the plugin
17 // object was created. 17 // object was created.
18 document.getElementById("plugin") 18 document.getElementById("plugin")
19 .addEventListener("message", HandleMessage, false); 19 .addEventListener("message", HandleMessage, false);
20 20
21 document.getElementById("start") 21 document.getElementById("start")
22 .addEventListener("click", StartRequest, false); 22 .addEventListener("click", StartRequest, false);
23 }); 23 });
OLDNEW
« no previous file with comments | « ppapi/examples/pluginfs/pluginfs.html ('k') | ppapi/ppapi_tests.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698