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

Unified Diff: native_client_sdk/src/examples/common.js

Issue 10828187: [NaCl SDK] Support multiple configs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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/common.js
diff --git a/native_client_sdk/src/examples/common.js b/native_client_sdk/src/examples/common.js
index f7df0d83b550c0d5abf7a3f8ff28e10591a2dd24..8c1d13224f0c2e7df0a88ccb3df39c2aee1fe542 100644
--- a/native_client_sdk/src/examples/common.js
+++ b/native_client_sdk/src/examples/common.js
@@ -19,13 +19,13 @@ var common = (function () {
* @param {number} width The width to create the plugin.
* @param {number} height The height to create the plugin.
*/
- function createNaClModule(name, tool, width, height) {
+ function createNaClModule(name, tool, config, width, height) {
var moduleEl = document.createElement('embed');
moduleEl.setAttribute('name', 'nacl_module');
moduleEl.setAttribute('id', 'nacl_module');
moduleEl.setAttribute('width', width);
moduleEl.setAttribute('height',height);
- moduleEl.setAttribute('src', tool + '/' + name + '.nmf');
+ moduleEl.setAttribute('src', tool + '/' + config + '/' + name + '.nmf');
moduleEl.setAttribute('type', 'application/x-nacl');
// The <EMBED> element is wrapped inside a <DIV>, which has both a 'load'
@@ -148,7 +148,7 @@ var common = (function () {
* @param {number} width The width to create the plugin.
* @param {number} height The height to create the plugin.
*/
- function pageDidLoad(name, tool, width, height) {
+ function pageDidLoad(name, tool, config, width, height) {
// If the page loads before the Native Client module loads, then set the
// status message indicating that the module is still loading. Otherwise,
// do not change the status message.
@@ -160,7 +160,7 @@ var common = (function () {
// plug-in graphic, if there is a problem.
width = typeof width !== 'undefined' ? width : 200;
height = typeof height !== 'undefined' ? height : 200;
- createNaClModule(name, tool, width, height);
+ createNaClModule(name, tool, config, width, height);
attachDefaultListeners();
} else {
// It's possible that the Native Client module onload event fired
« no previous file with comments | « native_client_sdk/src/build_tools/redirect.html ('k') | native_client_sdk/src/examples/debugging/index.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698