-
-
+
diff --git a/bower.json b/bower.json
index ca68843e..70116b70 100644
--- a/bower.json
+++ b/bower.json
@@ -97,15 +97,13 @@
"indexeddb-backbonejs-adapter",
"qrcode",
"libphonenumber-api",
- "momentjs",
- "native-client"
+ "momentjs"
],
"lib": [
"jquery",
"long",
"bytebuffer",
- "protobuf",
- "native-client"
+ "protobuf"
]
}
}
diff --git a/components/native-client/nacl-common.js b/components/native-client/nacl-common.js
deleted file mode 100644
index 6a78d428..00000000
--- a/components/native-client/nacl-common.js
+++ /dev/null
@@ -1,448 +0,0 @@
-// Copyright (c) 2012 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.
-
-// Set to true when the Document is loaded IFF "test=true" is in the query
-// string.
-var isTest = false;
-
-// Set to true when loading a "Release" NaCl module, false when loading a
-// "Debug" NaCl module.
-var isRelease = false;
-
-// Javascript module pattern:
-// see http://en.wikipedia.org/wiki/Unobtrusive_JavaScript#Namespaces
-// In essence, we define an anonymous function which is immediately called and
-// returns a new object. The new object contains only the exported definitions;
-// all other definitions in the anonymous function are inaccessible to external
-// code.
-var common = (function() {
-
- function isHostToolchain(tool) {
- return tool == 'win' || tool == 'linux' || tool == 'mac';
- }
-
- /**
- * Return the mime type for NaCl plugin.
- *
- * @param {string} tool The name of the toolchain, e.g. "glibc", "newlib" etc.
- * @return {string} The mime-type for the kind of NaCl plugin matching
- * the given toolchain.
- */
- function mimeTypeForTool(tool) {
- // For NaCl modules use application/x-nacl.
- var mimetype = 'application/x-nacl';
- if (isHostToolchain(tool)) {
- // For non-NaCl PPAPI plugins use the x-ppapi-debug/release
- // mime type.
- if (isRelease)
- mimetype = 'application/x-ppapi-release';
- else
- mimetype = 'application/x-ppapi-debug';
- } else if (tool == 'pnacl' && isRelease) {
- mimetype = 'application/x-pnacl';
- }
- return mimetype;
- }
-
- /**
- * Check if the browser supports NaCl plugins.
- *
- * @param {string} tool The name of the toolchain, e.g. "glibc", "newlib" etc.
- * @return {bool} True if the browser supports the type of NaCl plugin
- * produced by the given toolchain.
- */
- function browserSupportsNaCl(tool) {
- // Assume host toolchains always work with the given browser.
- // The below mime-type checking might not work with
- // --register-pepper-plugins.
- if (isHostToolchain(tool)) {
- return true;
- }
- var mimetype = mimeTypeForTool(tool);
- return navigator.mimeTypes[mimetype] !== undefined;
- }
-
- /**
- * Inject a script into the DOM, and call a callback when it is loaded.
- *
- * @param {string} url The url of the script to load.
- * @param {Function} onload The callback to call when the script is loaded.
- * @param {Function} onerror The callback to call if the script fails to load.
- */
- function injectScript(url, onload, onerror) {
- var scriptEl = document.createElement('script');
- scriptEl.type = 'text/javascript';
- scriptEl.src = url;
- scriptEl.onload = onload;
- if (onerror) {
- scriptEl.addEventListener('error', onerror, false);
- }
- document.head.appendChild(scriptEl);
- }
-
- /**
- * Run all tests for this example.
- *
- * @param {Object} moduleEl The module DOM element.
- */
- function runTests(moduleEl) {
- console.log('runTests()');
- common.tester = new Tester();
-
- // All NaCl SDK examples are OK if the example exits cleanly; (i.e. the
- // NaCl module returns 0 or calls exit(0)).
- //
- // Without this exception, the browser_tester thinks that the module
- // has crashed.
- common.tester.exitCleanlyIsOK();
-
- common.tester.addAsyncTest('loaded', function(test) {
- test.pass();
- });
-
- if (typeof window.addTests !== 'undefined') {
- window.addTests();
- }
-
- common.tester.waitFor(moduleEl);
- common.tester.run();
- }
-
- /**
- * Create the Native Client