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

Unified Diff: native_client_sdk/src/examples/input_events/example.js

Issue 13488007: [NaCl SDK] Make the SDK examples buildable as a packaged app. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix license headers Created 7 years, 8 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/input_events/example.js
diff --git a/native_client_sdk/src/examples/input_events/example.js b/native_client_sdk/src/examples/input_events/example.js
index eb335f00ed20be874d59afe21df4846b2fce91e1..003e8439d21738e6289debeeec885bea38a85079 100644
--- a/native_client_sdk/src/examples/input_events/example.js
+++ b/native_client_sdk/src/examples/input_events/example.js
@@ -2,9 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-var kMaxArraySize = 20;
-var messageArray = new Array();
-
// Called by the common.js module.
function moduleDidLoad() {
common.naclModule.style.backgroundColor = 'gray';
@@ -17,15 +14,7 @@ function attachListeners() {
// Called by the common.js module.
function handleMessage(message) {
- // Show last |kMaxArraySize| events in html.
- messageArray.push(message.data);
- if (messageArray.length > kMaxArraySize) {
- messageArray.shift();
- }
- var newData = messageArray.join('<BR>');
- document.getElementById('eventString').innerHTML = newData;
- // Print event to console.
- console.log(message.data);
+ common.logMessage(message.data);
}
function cancelQueue() {
« no previous file with comments | « native_client_sdk/src/examples/input_events/example.dsc ('k') | native_client_sdk/src/examples/input_events/index.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698