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

Unified Diff: native_client_sdk/src/examples/api/vpn_provider/example.js

Issue 1307173009: rebased ppapi vpnProvider (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkcr
Patch Set: fix compile Created 5 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:
View side-by-side diff with in-line comments
Download patch
Index: native_client_sdk/src/examples/api/vpn_provider/example.js
diff --git a/native_client_sdk/src/getting_started/part2/example.js b/native_client_sdk/src/examples/api/vpn_provider/example.js
similarity index 70%
copy from native_client_sdk/src/getting_started/part2/example.js
copy to native_client_sdk/src/examples/api/vpn_provider/example.js
index 7a392a2c6287b101760ea540a01a9d8600dfece0..fb405b27d0cf6055fa4796c566fdd74025c4b3a9 100644
--- a/native_client_sdk/src/getting_started/part2/example.js
+++ b/native_client_sdk/src/examples/api/vpn_provider/example.js
@@ -13,7 +13,20 @@ function moduleDidLoad() {
// NaCl module's <embed> element.
//
// postMessage sends a message to it.
+ // common.naclModule.postMessage('hello');
+}
+
+function load_me() {
common.naclModule.postMessage('hello');
+
+ document.getElementById("load").disabled = true;
+ document.getElementById("unload").disabled = false;
+}
+function unload_me() {
+ common.naclModule.postMessage('bye');
+
+ document.getElementById("load").disabled = false;
+ document.getElementById("unload").disabled = true;
}
// This function is called by common.js when a message is received from the

Powered by Google App Engine
This is Rietveld 408576698