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 411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
422 var toolbarContainerLeft = createElementWithClass('div', 'profiles-toolbar')
; | 422 var toolbarContainerLeft = createElementWithClass('div', 'profiles-toolbar')
; |
423 this.panelSidebarElement().insertBefore(toolbarContainerLeft, this.panelSide
barElement().firstChild); | 423 this.panelSidebarElement().insertBefore(toolbarContainerLeft, this.panelSide
barElement().firstChild); |
424 var toolbar = new UI.Toolbar('', toolbarContainerLeft); | 424 var toolbar = new UI.Toolbar('', toolbarContainerLeft); |
425 | 425 |
426 this._toggleRecordAction = | 426 this._toggleRecordAction = |
427 /** @type {!UI.Action }*/ (UI.actionRegistry.action('profiler.toggle-rec
ording')); | 427 /** @type {!UI.Action }*/ (UI.actionRegistry.action('profiler.toggle-rec
ording')); |
428 this._toggleRecordButton = UI.Toolbar.createActionButton(this._toggleRecordA
ction); | 428 this._toggleRecordButton = UI.Toolbar.createActionButton(this._toggleRecordA
ction); |
429 toolbar.appendToolbarItem(this._toggleRecordButton); | 429 toolbar.appendToolbarItem(this._toggleRecordButton); |
430 | 430 |
431 this.clearResultsButton = new UI.ToolbarButton(Common.UIString('Clear all pr
ofiles'), 'largeicon-clear'); | 431 this.clearResultsButton = new UI.ToolbarButton(Common.UIString('Clear all pr
ofiles'), 'largeicon-clear'); |
432 this.clearResultsButton.addEventListener(UI.ToolbarButton.Events.Click, this
._reset, this); | 432 this.clearResultsButton.addEventListener('click', this._reset, this); |
433 toolbar.appendToolbarItem(this.clearResultsButton); | 433 toolbar.appendToolbarItem(this.clearResultsButton); |
434 | 434 |
435 this._profileTypeToolbar = new UI.Toolbar('', this._toolbarElement); | 435 this._profileTypeToolbar = new UI.Toolbar('', this._toolbarElement); |
436 this._profileViewToolbar = new UI.Toolbar('', this._toolbarElement); | 436 this._profileViewToolbar = new UI.Toolbar('', this._toolbarElement); |
437 | 437 |
438 this._profileGroups = {}; | 438 this._profileGroups = {}; |
439 this._launcherView = new Profiler.MultiProfileLauncherView(this); | 439 this._launcherView = new Profiler.MultiProfileLauncherView(this); |
440 this._launcherView.addEventListener( | 440 this._launcherView.addEventListener( |
441 Profiler.MultiProfileLauncherView.Events.ProfileTypeSelected, this._onPr
ofileTypeSelected, this); | 441 Profiler.MultiProfileLauncherView.Events.ProfileTypeSelected, this._onPr
ofileTypeSelected, this); |
442 | 442 |
(...skipping 810 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1253 * @param {string} actionId | 1253 * @param {string} actionId |
1254 * @return {boolean} | 1254 * @return {boolean} |
1255 */ | 1255 */ |
1256 handleAction(context, actionId) { | 1256 handleAction(context, actionId) { |
1257 var panel = UI.context.flavor(Profiler.ProfilesPanel); | 1257 var panel = UI.context.flavor(Profiler.ProfilesPanel); |
1258 console.assert(panel && panel instanceof Profiler.ProfilesPanel); | 1258 console.assert(panel && panel instanceof Profiler.ProfilesPanel); |
1259 panel.toggleRecord(); | 1259 panel.toggleRecord(); |
1260 return true; | 1260 return true; |
1261 } | 1261 } |
1262 }; | 1262 }; |
OLD | NEW |