| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 /** | 5 /** |
| 6 * @unrestricted | 6 * @unrestricted |
| 7 * @implements {UI.Searchable} | 7 * @implements {UI.Searchable} |
| 8 */ | 8 */ |
| 9 Timeline.TimelineTreeView = class extends UI.VBox { | 9 Timeline.TimelineTreeView = class extends UI.VBox { |
| 10 constructor() { | 10 constructor() { |
| (...skipping 845 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 856 var domainMatch = /([^.]*\.)?[^.]*$/.exec(parsedURL.host); | 856 var domainMatch = /([^.]*\.)?[^.]*$/.exec(parsedURL.host); |
| 857 return domainMatch && domainMatch[0] || ''; | 857 return domainMatch && domainMatch[0] || ''; |
| 858 } | 858 } |
| 859 | 859 |
| 860 /** | 860 /** |
| 861 * @param {!SDK.TracingModel.Event} event | 861 * @param {!SDK.TracingModel.Event} event |
| 862 * @return {string} | 862 * @return {string} |
| 863 */ | 863 */ |
| 864 _productByEvent(event) { | 864 _productByEvent(event) { |
| 865 var url = TimelineModel.TimelineProfileTree.eventURL(event); | 865 var url = TimelineModel.TimelineProfileTree.eventURL(event); |
| 866 if (!url) | 866 if (!url || !this._productByURLCache) |
| 867 return ''; | 867 return ''; |
| 868 if (this._productByURLCache.has(url)) | 868 if (this._productByURLCache.has(url)) |
| 869 return this._productByURLCache.get(url); | 869 return this._productByURLCache.get(url); |
| 870 if (!this._productRegistry) | 870 if (!this._productRegistry) |
| 871 return ''; | 871 return ''; |
| 872 var parsedURL = url.asParsedURL(); | 872 var parsedURL = url.asParsedURL(); |
| 873 var name = parsedURL && this._productRegistry.nameForUrl(parsedURL) || ''; | 873 var name = parsedURL && this._productRegistry.nameForUrl(parsedURL) || ''; |
| 874 this._productByURLCache.set(url, name); | 874 this._productByURLCache.set(url, name); |
| 875 return name; | 875 return name; |
| 876 } | 876 } |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1017 | 1017 |
| 1018 _onSelectionChanged() { | 1018 _onSelectionChanged() { |
| 1019 this.dispatchEventToListeners(Timeline.TimelineStackView.Events.SelectionCha
nged); | 1019 this.dispatchEventToListeners(Timeline.TimelineStackView.Events.SelectionCha
nged); |
| 1020 } | 1020 } |
| 1021 }; | 1021 }; |
| 1022 | 1022 |
| 1023 /** @enum {symbol} */ | 1023 /** @enum {symbol} */ |
| 1024 Timeline.TimelineStackView.Events = { | 1024 Timeline.TimelineStackView.Events = { |
| 1025 SelectionChanged: Symbol('SelectionChanged') | 1025 SelectionChanged: Symbol('SelectionChanged') |
| 1026 }; | 1026 }; |
| OLD | NEW |