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

Unified Diff: ppapi/examples/crxfs/crxfs.js

Issue 14188019: CRX FileSystem Pepper private API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 7 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:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ppapi/examples/crxfs/crxfs.html ('k') | ppapi/examples/crxfs/manifest.json » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/examples/crxfs/crxfs.js
diff --git a/ppapi/examples/crxfs/crxfs.js b/ppapi/examples/crxfs/crxfs.js
new file mode 100644
index 0000000000000000000000000000000000000000..383f9330e4b65e31e7bdfe1e84ad842af3aad309
--- /dev/null
+++ b/ppapi/examples/crxfs/crxfs.js
@@ -0,0 +1,23 @@
+// Copyright (c) 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+function StartRequest() {
+ var plugin = document.getElementById("plugin");
+ var filename = document.getElementById("filename").value;
+ plugin.postMessage(filename);
+}
+
+function HandleMessage(message_event) {
+ document.getElementById("content").value = message_event.data;
+}
+
+document.addEventListener('DOMContentLoaded', function () {
+ // Attach a listener for the message event. This must happen after the plugin
+ // object was created.
+ document.getElementById("plugin")
+ .addEventListener("message", HandleMessage, false);
+
+ document.getElementById("start")
+ .addEventListener("click", StartRequest, false);
+});
« no previous file with comments | « ppapi/examples/crxfs/crxfs.html ('k') | ppapi/examples/crxfs/manifest.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698