| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2014 The Chromium Authors. All rights reserved. | 2 * Copyright 2014 The Chromium Authors. All rights reserved. |
| 3 * Use of this source code is governed by a BSD-style license that can be | 3 * Use of this source code is governed by a BSD-style license that can be |
| 4 * found in the LICENSE file. | 4 * found in the LICENSE file. |
| 5 */ | 5 */ |
| 6 | 6 |
| 7 /** | 7 /** |
| 8 * @constructor | 8 * @constructor |
| 9 * @implements {WebInspector.TimelineModeView} | 9 * @implements {WebInspector.TimelineModeView} |
| 10 * @implements {WebInspector.FlameChartDelegate} | 10 * @implements {WebInspector.FlameChartDelegate} |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 * @param {number} windowStartTime | 31 * @param {number} windowStartTime |
| 32 * @param {number} windowEndTime | 32 * @param {number} windowEndTime |
| 33 */ | 33 */ |
| 34 requestWindowTimes: function(windowStartTime, windowEndTime) | 34 requestWindowTimes: function(windowStartTime, windowEndTime) |
| 35 { | 35 { |
| 36 this._delegate.requestWindowTimes(windowStartTime, windowEndTime); | 36 this._delegate.requestWindowTimes(windowStartTime, windowEndTime); |
| 37 }, | 37 }, |
| 38 | 38 |
| 39 wasShown: function() | 39 wasShown: function() |
| 40 { | 40 { |
| 41 this._mainView._scheduleUpdate(); | 41 this._mainView.scheduleUpdate(); |
| 42 }, | 42 }, |
| 43 | 43 |
| 44 /** | 44 /** |
| 45 * @return {!WebInspector.View} | 45 * @return {!WebInspector.View} |
| 46 */ | 46 */ |
| 47 view: function() | 47 view: function() |
| 48 { | 48 { |
| 49 return this; | 49 return this; |
| 50 }, | 50 }, |
| 51 | 51 |
| 52 dispose: function() | 52 dispose: function() |
| 53 { | 53 { |
| 54 }, | 54 }, |
| 55 | 55 |
| 56 reset: function() | 56 reset: function() |
| 57 { | 57 { |
| 58 this._dataProvider.reset(); | 58 this._dataProvider.reset(); |
| 59 this._mainView.setWindowTimes(0, Infinity); | 59 this._mainView.setWindowTimes(0, Infinity); |
| 60 }, | 60 }, |
| 61 | 61 |
| 62 /** | 62 /** |
| 63 * @param {?RegExp} textFilter | 63 * @param {?RegExp} textFilter |
| 64 */ | 64 */ |
| 65 refreshRecords: function(textFilter) | 65 refreshRecords: function(textFilter) |
| 66 { | 66 { |
| 67 this._dataProvider.reset(); | 67 this._dataProvider.reset(); |
| 68 this._mainView._scheduleUpdate(); | 68 this._mainView.scheduleUpdate(); |
| 69 }, | 69 }, |
| 70 | 70 |
| 71 /** | 71 /** |
| 72 * @param {!WebInspector.TimelineModel.Record} record | 72 * @param {!WebInspector.TimelineModel.Record} record |
| 73 */ | 73 */ |
| 74 addRecord: function(record) {}, | 74 addRecord: function(record) {}, |
| 75 | 75 |
| 76 /** | 76 /** |
| 77 * @param {?WebInspector.TimelineModel.Record} record | 77 * @param {?WebInspector.TimelineModel.Record} record |
| 78 * @param {string=} regex | 78 * @param {string=} regex |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 */ | 130 */ |
| 131 function appendPreviewAndshowDetails(node) | 131 function appendPreviewAndshowDetails(node) |
| 132 { | 132 { |
| 133 if (node) | 133 if (node) |
| 134 contentHelper.appendElementRow("Preview", node); | 134 contentHelper.appendElementRow("Preview", node); |
| 135 this._delegate.showInDetails(WebInspector.UIString("Selected Event")
, contentHelper.element); | 135 this._delegate.showInDetails(WebInspector.UIString("Selected Event")
, contentHelper.element); |
| 136 } | 136 } |
| 137 var recordTypes = WebInspector.TracingTimelineModel.RecordType; | 137 var recordTypes = WebInspector.TracingTimelineModel.RecordType; |
| 138 switch (record.name) { | 138 switch (record.name) { |
| 139 case recordTypes.PictureSnapshot: | 139 case recordTypes.PictureSnapshot: |
| 140 WebInspector.TracingTimelineUIUtils._buildPicturePreviewContent(reco
rd.args["snapshot"]["skp64"], appendPreviewAndshowDetails.bind(this)); | 140 WebInspector.TracingTimelineUIUtils.buildPicturePreviewContent(recor
d.args["snapshot"]["skp64"], appendPreviewAndshowDetails.bind(this)); |
| 141 break; | 141 break; |
| 142 case recordTypes.LayerTreeHostImplSnapshot: | 142 case recordTypes.LayerTreeHostImplSnapshot: |
| 143 var link = document.createElement("span"); | 143 var link = document.createElement("span"); |
| 144 link.classList.add("revealable-link"); | 144 link.classList.add("revealable-link"); |
| 145 link.textContent = "show"; | 145 link.textContent = "show"; |
| 146 link.addEventListener("click", reveal.bind(this), false); | 146 link.addEventListener("click", reveal.bind(this), false); |
| 147 contentHelper.appendElementRow(WebInspector.UIString("Layer tree"),
link); | 147 contentHelper.appendElementRow(WebInspector.UIString("Layer tree"),
link); |
| 148 // Fall-through intended. | 148 // Fall-through intended. |
| 149 default: | 149 default: |
| 150 this._delegate.showInDetails(WebInspector.UIString("Selected Event")
, contentHelper.element); | 150 this._delegate.showInDetails(WebInspector.UIString("Selected Event")
, contentHelper.element); |
| (...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 547 /** | 547 /** |
| 548 * @param {string} string | 548 * @param {string} string |
| 549 * @return {string} | 549 * @return {string} |
| 550 */ | 550 */ |
| 551 colorForString: function(string) | 551 colorForString: function(string) |
| 552 { | 552 { |
| 553 var hash = WebInspector.TraceViewPalette._stringHash(string); | 553 var hash = WebInspector.TraceViewPalette._stringHash(string); |
| 554 return this._palette[hash % this._palette.length]; | 554 return this._palette[hash % this._palette.length]; |
| 555 } | 555 } |
| 556 }; | 556 }; |
| OLD | NEW |