OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2014 Google Inc. All rights reserved. | 2 * Copyright (C) 2014 Google 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 are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 23 matching lines...) Expand all Loading... |
34 * @param {!WebInspector.TimelineModel} model | 34 * @param {!WebInspector.TimelineModel} model |
35 * @param {!WebInspector.TimelineFrameModel} frameModel | 35 * @param {!WebInspector.TimelineFrameModel} frameModel |
36 * @param {boolean} mainThread | 36 * @param {boolean} mainThread |
37 */ | 37 */ |
38 WebInspector.TimelineFlameChartDataProvider = function(model, frameModel, mainTh
read) | 38 WebInspector.TimelineFlameChartDataProvider = function(model, frameModel, mainTh
read) |
39 { | 39 { |
40 WebInspector.FlameChartDataProvider.call(this); | 40 WebInspector.FlameChartDataProvider.call(this); |
41 this._model = model; | 41 this._model = model; |
42 this._frameModel = frameModel; | 42 this._frameModel = frameModel; |
43 this._mainThread = mainThread; | 43 this._mainThread = mainThread; |
44 this._font = (this.barHeight() - 4) + "px " + WebInspector.fontFamily(); | 44 this._font = "bold 12px " + WebInspector.fontFamily(); |
45 | 45 |
46 this._colorGenerator = new WebInspector.FlameChart.ColorGenerator(); | 46 this._colorGenerator = new WebInspector.FlameChart.ColorGenerator(); |
47 var categories = WebInspector.TimelineUIUtils.categories(); | 47 var categories = WebInspector.TimelineUIUtils.categories(); |
48 for (var category in categories) | 48 for (var category in categories) |
49 this._colorGenerator.setColorForID(category, categories[category].fillCo
lorStop1); | 49 this._colorGenerator.setColorForID(category, categories[category].fillCo
lorStop1); |
50 } | 50 } |
51 | 51 |
52 WebInspector.TimelineFlameChartDataProvider.prototype = { | 52 WebInspector.TimelineFlameChartDataProvider.prototype = { |
53 /** | 53 /** |
54 * @return {number} | 54 * @return {number} |
55 */ | 55 */ |
56 barHeight: function() | 56 barHeight: function() |
57 { | 57 { |
58 return 15; | 58 return 20; |
59 }, | 59 }, |
60 | 60 |
61 /** | 61 /** |
| 62 * @return {number} |
| 63 */ |
| 64 textBaseline: function() |
| 65 { |
| 66 return 6; |
| 67 }, |
| 68 |
| 69 /** |
| 70 * @return {number} |
| 71 */ |
| 72 textPadding: function() |
| 73 { |
| 74 return 5; |
| 75 }, |
| 76 |
| 77 /** |
62 * @param {number} entryIndex | 78 * @param {number} entryIndex |
63 * @return {string} | 79 * @return {string} |
64 */ | 80 */ |
65 entryFont: function(entryIndex) | 81 entryFont: function(entryIndex) |
66 { | 82 { |
67 return this._font; | 83 return this._font; |
68 }, | 84 }, |
69 | 85 |
70 /** | 86 /** |
71 * @param {number} entryIndex | 87 * @param {number} entryIndex |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
233 return null; | 249 return null; |
234 }, | 250 }, |
235 | 251 |
236 /** | 252 /** |
237 * @param {number} entryIndex | 253 * @param {number} entryIndex |
238 * @return {!string} | 254 * @return {!string} |
239 */ | 255 */ |
240 entryColor: function(entryIndex) | 256 entryColor: function(entryIndex) |
241 { | 257 { |
242 return this._entryColors[entryIndex]; | 258 return this._entryColors[entryIndex]; |
| 259 }, |
| 260 |
| 261 /** |
| 262 * @param {number} entryIndex |
| 263 * @return {!string} |
| 264 */ |
| 265 textColor: function(entryIndex) |
| 266 { |
| 267 return "white"; |
243 } | 268 } |
244 } | 269 } |
245 | 270 |
246 /** | 271 /** |
247 * @constructor | 272 * @constructor |
248 * @extends {WebInspector.View} | 273 * @extends {WebInspector.View} |
249 * @implements {WebInspector.TimelineModeView} | 274 * @implements {WebInspector.TimelineModeView} |
250 * @implements {WebInspector.TimeRangeController} | 275 * @implements {WebInspector.TimeRangeController} |
251 * @param {!WebInspector.TimelineModeViewDelegate} delegate | 276 * @param {!WebInspector.TimelineModeViewDelegate} delegate |
252 * @param {!WebInspector.TimelineModel} model | 277 * @param {!WebInspector.TimelineModel} model |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
345 | 370 |
346 /** | 371 /** |
347 * @param {?WebInspector.TimelineModel.Record} record | 372 * @param {?WebInspector.TimelineModel.Record} record |
348 */ | 373 */ |
349 setSelectedRecord: function(record) | 374 setSelectedRecord: function(record) |
350 { | 375 { |
351 }, | 376 }, |
352 | 377 |
353 __proto__: WebInspector.View.prototype | 378 __proto__: WebInspector.View.prototype |
354 } | 379 } |
OLD | NEW |