OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 469 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
480 * @override | 480 * @override |
481 * @return {?UI.SearchableView} | 481 * @return {?UI.SearchableView} |
482 */ | 482 */ |
483 searchableView() { | 483 searchableView() { |
484 return this.visibleView && this.visibleView.searchableView ? this.visibleVie
w.searchableView() : null; | 484 return this.visibleView && this.visibleView.searchableView ? this.visibleVie
w.searchableView() : null; |
485 } | 485 } |
486 | 486 |
487 _createFileSelectorElement() { | 487 _createFileSelectorElement() { |
488 if (this._fileSelectorElement) | 488 if (this._fileSelectorElement) |
489 this.element.removeChild(this._fileSelectorElement); | 489 this.element.removeChild(this._fileSelectorElement); |
490 this._fileSelectorElement = Bindings.createFileSelectorElement(this._loadFro
mFile.bind(this)); | 490 this._fileSelectorElement = UI.createFileSelectorElement(this._loadFromFile.
bind(this)); |
491 Profiler.ProfilesPanel._fileSelectorElement = this._fileSelectorElement; | 491 Profiler.ProfilesPanel._fileSelectorElement = this._fileSelectorElement; |
492 this.element.appendChild(this._fileSelectorElement); | 492 this.element.appendChild(this._fileSelectorElement); |
493 } | 493 } |
494 | 494 |
495 _findProfileTypeByExtension(fileName) { | 495 _findProfileTypeByExtension(fileName) { |
496 var types = Profiler.ProfileTypeRegistry.instance.profileTypes(); | 496 var types = Profiler.ProfileTypeRegistry.instance.profileTypes(); |
497 for (var i = 0; i < types.length; i++) { | 497 for (var i = 0; i < types.length; i++) { |
498 var type = types[i]; | 498 var type = types[i]; |
499 var extension = type.fileExtension(); | 499 var extension = type.fileExtension(); |
500 if (!extension) | 500 if (!extension) |
(...skipping 742 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1243 * @param {string} actionId | 1243 * @param {string} actionId |
1244 * @return {boolean} | 1244 * @return {boolean} |
1245 */ | 1245 */ |
1246 handleAction(context, actionId) { | 1246 handleAction(context, actionId) { |
1247 var panel = UI.context.flavor(Profiler.ProfilesPanel); | 1247 var panel = UI.context.flavor(Profiler.ProfilesPanel); |
1248 console.assert(panel && panel instanceof Profiler.ProfilesPanel); | 1248 console.assert(panel && panel instanceof Profiler.ProfilesPanel); |
1249 panel.toggleRecord(); | 1249 panel.toggleRecord(); |
1250 return true; | 1250 return true; |
1251 } | 1251 } |
1252 }; | 1252 }; |
OLD | NEW |