| 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 30 matching lines...) Expand all Loading... |
| 41 this.registerRequiredCSS('profiler/profilesPanel.css'); | 41 this.registerRequiredCSS('profiler/profilesPanel.css'); |
| 42 this.registerRequiredCSS('components/objectValue.css'); | 42 this.registerRequiredCSS('components/objectValue.css'); |
| 43 | 43 |
| 44 var mainContainer = new UI.VBox(); | 44 var mainContainer = new UI.VBox(); |
| 45 this.splitWidget().setMainWidget(mainContainer); | 45 this.splitWidget().setMainWidget(mainContainer); |
| 46 | 46 |
| 47 this.profilesItemTreeElement = new Profiler.ProfilesSidebarTreeElement(this)
; | 47 this.profilesItemTreeElement = new Profiler.ProfilesSidebarTreeElement(this)
; |
| 48 | 48 |
| 49 this._sidebarTree = new UI.TreeOutlineInShadow(); | 49 this._sidebarTree = new UI.TreeOutlineInShadow(); |
| 50 this._sidebarTree.registerRequiredCSS('profiler/profilesSidebarTree.css'); | 50 this._sidebarTree.registerRequiredCSS('profiler/profilesSidebarTree.css'); |
| 51 this._sidebarTree.element.classList.add('profiles-sidebar-tree-box'); |
| 51 this.panelSidebarElement().appendChild(this._sidebarTree.element); | 52 this.panelSidebarElement().appendChild(this._sidebarTree.element); |
| 52 | 53 |
| 53 this._sidebarTree.appendChild(this.profilesItemTreeElement); | 54 this._sidebarTree.appendChild(this.profilesItemTreeElement); |
| 54 | 55 |
| 55 this.profileViews = createElement('div'); | 56 this.profileViews = createElement('div'); |
| 56 this.profileViews.id = 'profile-views'; | 57 this.profileViews.id = 'profile-views'; |
| 57 this.profileViews.classList.add('vbox'); | 58 this.profileViews.classList.add('vbox'); |
| 58 mainContainer.element.appendChild(this.profileViews); | 59 mainContainer.element.appendChild(this.profileViews); |
| 59 | 60 |
| 60 this._toolbarElement = createElementWithClass('div', 'profiles-toolbar'); | 61 this._toolbarElement = createElementWithClass('div', 'profiles-toolbar'); |
| 61 mainContainer.element.insertBefore(this._toolbarElement, mainContainer.eleme
nt.firstChild); | 62 mainContainer.element.insertBefore(this._toolbarElement, mainContainer.eleme
nt.firstChild); |
| 62 | 63 |
| 63 this.panelSidebarElement().classList.add('profiles-sidebar-tree-box'); | 64 this.panelSidebarElement().classList.add('profiles-tree-sidebar'); |
| 64 var toolbarContainerLeft = createElementWithClass('div', 'profiles-toolbar')
; | 65 var toolbarContainerLeft = createElementWithClass('div', 'profiles-toolbar')
; |
| 65 this.panelSidebarElement().insertBefore(toolbarContainerLeft, this.panelSide
barElement().firstChild); | 66 this.panelSidebarElement().insertBefore(toolbarContainerLeft, this.panelSide
barElement().firstChild); |
| 66 var toolbar = new UI.Toolbar('', toolbarContainerLeft); | 67 var toolbar = new UI.Toolbar('', toolbarContainerLeft); |
| 67 | 68 |
| 68 this._toggleRecordAction = | 69 this._toggleRecordAction = |
| 69 /** @type {!UI.Action }*/ (UI.actionRegistry.action(recordingActionId)); | 70 /** @type {!UI.Action }*/ (UI.actionRegistry.action(recordingActionId)); |
| 70 this._toggleRecordButton = UI.Toolbar.createActionButton(this._toggleRecordA
ction); | 71 this._toggleRecordButton = UI.Toolbar.createActionButton(this._toggleRecordA
ction); |
| 71 toolbar.appendToolbarItem(this._toggleRecordButton); | 72 toolbar.appendToolbarItem(this._toggleRecordButton); |
| 72 | 73 |
| 73 this.clearResultsButton = new UI.ToolbarButton(Common.UIString('Clear all pr
ofiles'), 'largeicon-clear'); | 74 this.clearResultsButton = new UI.ToolbarButton(Common.UIString('Clear all pr
ofiles'), 'largeicon-clear'); |
| (...skipping 739 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 813 * @param {string} actionId | 814 * @param {string} actionId |
| 814 * @return {boolean} | 815 * @return {boolean} |
| 815 */ | 816 */ |
| 816 handleAction(context, actionId) { | 817 handleAction(context, actionId) { |
| 817 var panel = UI.context.flavor(Profiler.JSProfilerPanel); | 818 var panel = UI.context.flavor(Profiler.JSProfilerPanel); |
| 818 console.assert(panel && panel instanceof Profiler.JSProfilerPanel); | 819 console.assert(panel && panel instanceof Profiler.JSProfilerPanel); |
| 819 panel.toggleRecord(); | 820 panel.toggleRecord(); |
| 820 return true; | 821 return true; |
| 821 } | 822 } |
| 822 }; | 823 }; |
| OLD | NEW |