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

Side by Side Diff: chrome/browser/resources/gpu_internals/info_view.js

Issue 6551019: Trace_event upgrades (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More gooder js thanks to arv. Created 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 /** 5 /**
6 * This view displays options for importing/exporting the captured data. Its 6 * This view displays options for importing/exporting the captured data. Its
7 * primarily usefulness is to allow users to copy-paste their data in an easy 7 * primarily usefulness is to allow users to copy-paste their data in an easy
8 * to read format for bug reports. 8 * to read format for bug reports.
9 * 9 *
10 * - Has a button to generate a text report. 10 * - Has a button to generate a text report.
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 this.setText_('diagnostics', '... loading...'); 112 this.setText_('diagnostics', '... loading...');
113 } else { 113 } else {
114 this.setText_('diagnostics', 'None'); 114 this.setText_('diagnostics', 'None');
115 } 115 }
116 } else { 116 } else {
117 this.setText_('basic-info', '... loading ...'); 117 this.setText_('basic-info', '... loading ...');
118 this.setText_('diagnostics', '... loading ...'); 118 this.setText_('diagnostics', '... loading ...');
119 } 119 }
120 120
121 // Log messages 121 // Log messages
122 jstProcess(new JsEvalContext({values: this.logMessages_}), 122 if(window.jstProcess)
arv (Not doing code reviews) 2011/02/25 00:51:29 ws after if, while, for etc. (I guess the only exc
arv (Not doing code reviews) 2011/02/25 00:51:29 if (typeof jstProcess != 'undefined') {
123 document.getElementById('log-messages')); 123 jstProcess(new JsEvalContext({values: this.logMessages_}),
124 document.getElementById('log-messages'));
124 }, 125 },
125 126
126 setText_: function(outputElementId, text) { 127 setText_: function(outputElementId, text) {
127 var peg = document.getElementById(outputElementId); 128 var peg = document.getElementById(outputElementId);
128 peg.innerText = text; 129 peg.innerText = text;
129 }, 130 },
130 131
131 setTable_: function(outputElementId, inputData) { 132 setTable_: function(outputElementId, inputData) {
132 var template = jstGetTemplate('info-view-table-template'); 133 var template = jstGetTemplate('info-view-table-template');
133 jstProcess(new JsEvalContext({value: inputData}), 134 jstProcess(new JsEvalContext({value: inputData}),
134 template); 135 template);
135 136
136 var peg = document.getElementById(outputElementId); 137 var peg = document.getElementById(outputElementId);
137 if (!peg) 138 if (!peg)
138 throw new Error('Node ' + outputElementId + ' not found'); 139 throw new Error('Node ' + outputElementId + ' not found');
139 140
140 peg.innerHTML = ''; 141 peg.innerHTML = '';
141 peg.appendChild(template); 142 peg.appendChild(template);
142 } 143 }
143 }; 144 };
144 145
145 return { 146 return {
146 InfoView: InfoView 147 InfoView: InfoView
147 }; 148 };
148 }); 149 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698