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

Side by Side Diff: native_client_sdk/src/examples/demo/life/example.js

Issue 15011003: ppapi_simple (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Restore images 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Start up the paint timer when the NaCl module has loaded.
6 function moduleDidLoad() {
7 setInterval(postPaintMessage, 5);
8 }
9
10 function postPaintMessage() {
11 common.naclModule.postMessage('paint');
12 }
13
14 // Handle a message coming from the NaCl module. The message payload is 5 // Handle a message coming from the NaCl module. The message payload is
15 // assumed to contain the current estimated value of Pi. Update the Pi 6 // assumed to contain the current estimated value of Pi. Update the Pi
16 // text display with this value. 7 // text display with this value.
17 function handleMessage(message_event) { 8 function handleMessage(message_event) {
binji 2013/05/23 18:06:49 remove
noelallen1 2013/05/23 22:01:24 Done.
18 document.getElementById('pi').value = message_event.data; 9 document.getElementById('pi').value = message_event.data;
19 } 10 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698