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

Side by Side Diff: native_client_sdk/src/examples/trace_events/example.js

Issue 12212198: Add C++ Trace Event support to PPAPI/NaCl SDK (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: brettw feedback Created 7 years, 10 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
OLDNEW
(Empty)
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 // Called by the common.js module.
6 function moduleDidLoad() {
7 // The module is not hidden by default so we can easily see if the plugin
8 // failed to load.
9 common.hideModule();
10 }
11
12 // Called by the common.js module.
13 function attachListeners() {
14 document.getElementById('runthreadedtask').addEventListener('click',
15 runthreadedtask);
16 document.getElementById('sendasynctrace').addEventListener('click',
17 sendasynctrace);
18 }
19
20 function runthreadedtask() {
21 common.naclModule.postMessage('runthreadedtask');
22 }
23
24 function sendasynctrace() {
25 var async_button = document.getElementById('sendasynctrace');
26 if (async_button.value == 'Send trace begin') {
27 common.naclModule.postMessage('sendasyncbegin');
28 async_button.value = 'Send trace end';
29 } else {
30 common.naclModule.postMessage('sendasyncend');
31 async_button.value = 'Send trace begin';
32 }
33 }
34
35 // Called by the common.js module.
36 function handleMessage(message_event) {
37 }
OLDNEW
« no previous file with comments | « native_client_sdk/src/examples/trace_events/example.dsc ('k') | native_client_sdk/src/examples/trace_events/index.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698