Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(123)

Side by Side Diff: Source/devtools/front_end/timeline/TracingTimelineUIUtils.js

Issue 336373002: Parametrize TimelinePresentationModel with coalescable record types (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/devtools/front_end/timeline/TimelineView.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 */ 6 */
7 WebInspector.TracingTimelineUIUtils = function() { } 7 WebInspector.TracingTimelineUIUtils = function() { }
8 8
9 /** 9 /**
10 * @constructor 10 * @constructor
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 eventStyles[recordTypes.WebSocketReceiveHandshakeResponse] = new WebInspecto r.TimelineRecordStyle(WebInspector.UIString("Receive WebSocket Handshake"), cate gories["scripting"]); 73 eventStyles[recordTypes.WebSocketReceiveHandshakeResponse] = new WebInspecto r.TimelineRecordStyle(WebInspector.UIString("Receive WebSocket Handshake"), cate gories["scripting"]);
74 eventStyles[recordTypes.WebSocketDestroy] = new WebInspector.TimelineRecordS tyle(WebInspector.UIString("Destroy WebSocket"), categories["scripting"]); 74 eventStyles[recordTypes.WebSocketDestroy] = new WebInspector.TimelineRecordS tyle(WebInspector.UIString("Destroy WebSocket"), categories["scripting"]);
75 eventStyles[recordTypes.EmbedderCallback] = new WebInspector.TimelineRecordS tyle(WebInspector.UIString("Embedder Callback"), categories["scripting"]); 75 eventStyles[recordTypes.EmbedderCallback] = new WebInspector.TimelineRecordS tyle(WebInspector.UIString("Embedder Callback"), categories["scripting"]);
76 eventStyles[recordTypes.DecodeImage] = new WebInspector.TimelineRecordStyle( WebInspector.UIString("Image Decode"), categories["painting"]); 76 eventStyles[recordTypes.DecodeImage] = new WebInspector.TimelineRecordStyle( WebInspector.UIString("Image Decode"), categories["painting"]);
77 eventStyles[recordTypes.ResizeImage] = new WebInspector.TimelineRecordStyle( WebInspector.UIString("Image Resize"), categories["painting"]); 77 eventStyles[recordTypes.ResizeImage] = new WebInspector.TimelineRecordStyle( WebInspector.UIString("Image Resize"), categories["painting"]);
78 78
79 WebInspector.TracingTimelineUIUtils._eventStylesMap = eventStyles; 79 WebInspector.TracingTimelineUIUtils._eventStylesMap = eventStyles;
80 return eventStyles; 80 return eventStyles;
81 } 81 }
82 82
83 WebInspector.TracingTimelineUIUtils.coalescableRecordTypes = {};
84 WebInspector.TracingTimelineUIUtils.coalescableRecordTypes[WebInspector.TracingT imelineModel.RecordType.Layout] = 1;
85 WebInspector.TracingTimelineUIUtils.coalescableRecordTypes[WebInspector.TracingT imelineModel.RecordType.Paint] = 1;
86 WebInspector.TracingTimelineUIUtils.coalescableRecordTypes[WebInspector.TracingT imelineModel.RecordType.Rasterize] = 1;
87 WebInspector.TracingTimelineUIUtils.coalescableRecordTypes[WebInspector.TracingT imelineModel.RecordType.DecodeImage] = 1;
88 WebInspector.TracingTimelineUIUtils.coalescableRecordTypes[WebInspector.TracingT imelineModel.RecordType.ResizeImage] = 1;
89
83 /** 90 /**
84 * @param {!WebInspector.TracingModel.Event} event 91 * @param {!WebInspector.TracingModel.Event} event
85 * @return {!{title: string, category: !WebInspector.TimelineCategory}} 92 * @return {!{title: string, category: !WebInspector.TimelineCategory}}
86 */ 93 */
87 WebInspector.TracingTimelineUIUtils.eventStyle = function(event) 94 WebInspector.TracingTimelineUIUtils.eventStyle = function(event)
88 { 95 {
89 return WebInspector.TracingTimelineUIUtils.styleForTraceEvent(event.name); 96 return WebInspector.TracingTimelineUIUtils.styleForTraceEvent(event.name);
90 } 97 }
91 98
92 /** 99 /**
(...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after
535 callback(); 542 callback();
536 return; 543 return;
537 } 544 }
538 var container = document.createElement("div"); 545 var container = document.createElement("div");
539 container.className = "image-preview-container"; 546 container.className = "image-preview-container";
540 var img = container.createChild("img"); 547 var img = container.createChild("img");
541 img.src = encodedBitmap; 548 img.src = encodedBitmap;
542 callback(container); 549 callback(container);
543 } 550 }
544 } 551 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/timeline/TimelineView.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698