| OLD | NEW |
| 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 /** | 5 /** |
| 6 * Dictionary of constants (Initialized soon after loading by data from browser, | 6 * Dictionary of constants (Initialized soon after loading by data from browser, |
| 7 * updated on load log). | 7 * updated on load log). |
| 8 */ | 8 */ |
| 9 var LogEventType = null; | 9 var LogEventType = null; |
| 10 var LogEventPhase = null; | 10 var LogEventPhase = null; |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 * HTML elements that send messages to the browser. Cannot be undone | 161 * HTML elements that send messages to the browser. Cannot be undone |
| 162 * without reloading the page. Must be called before passing loaded data | 162 * without reloading the page. Must be called before passing loaded data |
| 163 * to the individual views. | 163 * to the individual views. |
| 164 * | 164 * |
| 165 * @param {String} opt_fileName The name of the log file that has been | 165 * @param {String} opt_fileName The name of the log file that has been |
| 166 * loaded, if we're loading a log file. | 166 * loaded, if we're loading a log file. |
| 167 */ | 167 */ |
| 168 onLoadLog: function(opt_fileName) { | 168 onLoadLog: function(opt_fileName) { |
| 169 isViewingLoadedLog = true; | 169 isViewingLoadedLog = true; |
| 170 | 170 |
| 171 g_browser.sourceTracker.setSecurityStripping(false); | 171 SourceTracker.getInstance().setSecurityStripping(false); |
| 172 this.stopCapturing(); | 172 this.stopCapturing(); |
| 173 if (opt_fileName != undefined) { | 173 if (opt_fileName != undefined) { |
| 174 // If there's a file name, a log file was loaded, so swap out the status | 174 // If there's a file name, a log file was loaded, so swap out the status |
| 175 // bar to indicate we're no longer capturing events. | 175 // bar to indicate we're no longer capturing events. |
| 176 this.statusView_.switchToSubView('loaded').setFileName(opt_fileName); | 176 this.statusView_.switchToSubView('loaded').setFileName(opt_fileName); |
| 177 } else { | 177 } else { |
| 178 // Otherwise, the "Stop Capturing" button was presumably pressed. | 178 // Otherwise, the "Stop Capturing" button was presumably pressed. |
| 179 this.statusView_.switchToSubView('halted'); | 179 this.statusView_.switchToSubView('halted'); |
| 180 } | 180 } |
| 181 }, | 181 }, |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 284 | 284 |
| 285 /** | 285 /** |
| 286 * Returns a string representation of |family|. | 286 * Returns a string representation of |family|. |
| 287 */ | 287 */ |
| 288 function addressFamilyToString(family) { | 288 function addressFamilyToString(family) { |
| 289 var str = getKeyWithValue(AddressFamily, family); | 289 var str = getKeyWithValue(AddressFamily, family); |
| 290 // All the address family start with ADDRESS_FAMILY_*. | 290 // All the address family start with ADDRESS_FAMILY_*. |
| 291 // Strip that prefix since it is redundant and only clutters the output. | 291 // Strip that prefix since it is redundant and only clutters the output. |
| 292 return str.replace(/^ADDRESS_FAMILY_/, ''); | 292 return str.replace(/^ADDRESS_FAMILY_/, ''); |
| 293 } | 293 } |
| OLD | NEW |