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

Unified Diff: Source/devtools/front_end/timeline/TimelineFrameOverview.js

Issue 1178563002: DevTools: Refactor network panel overview (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: update test. Created 5 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 side-by-side diff with in-line comments
Download patch
Index: Source/devtools/front_end/timeline/TimelineFrameOverview.js
diff --git a/Source/devtools/front_end/timeline/TimelineFrameOverview.js b/Source/devtools/front_end/timeline/TimelineFrameOverview.js
index 72b3eb29653432c76d3f002ef62be005b9a5f476..778450e862122acad5913a0c83579dc0079c02a6 100644
--- a/Source/devtools/front_end/timeline/TimelineFrameOverview.js
+++ b/Source/devtools/front_end/timeline/TimelineFrameOverview.js
@@ -36,8 +36,9 @@
*/
WebInspector.TimelineFrameOverview = function(model, frameModel)
{
- WebInspector.TimelineOverviewBase.call(this, model);
+ WebInspector.TimelineOverviewBase.call(this);
this.element.id = "timeline-overview-frames";
+ this._model = model;
this._frameModel = frameModel;
this.reset();
@@ -62,6 +63,10 @@ WebInspector.TimelineFrameOverview = function(model, frameModel)
this.element.addEventListener("mouseout", this._onMouseOut.bind(this), false);
}
+WebInspector.TimelineFrameOverview.Events = {
+ SelectionChanged: "SelectionChanged"
+}
+
WebInspector.TimelineFrameOverview.prototype = {
/**
* @override
@@ -103,7 +108,6 @@ WebInspector.TimelineFrameOverview.prototype = {
},
/**
- * @override
* @param {?WebInspector.TimelineSelection} selection
*/
select: function(selection)
@@ -122,14 +126,16 @@ WebInspector.TimelineFrameOverview.prototype = {
/**
* @override
* @param {!Event} event
- * @return {?WebInspector.TimelineSelection|undefined}
+ * @return {boolean}
*/
- selectionFromEvent: function(event)
+ onClick: function(event)
{
var barIndex = this._screenPositionToBarIndex(event.clientX);
if (barIndex < 0 || barIndex >= this._visibleFrames.length)
- return null;
- return WebInspector.TimelineSelection.fromFrame(this._visibleFrames[barIndex]);
+ return false;
+ var selection = WebInspector.TimelineSelection.fromFrame(this._visibleFrames[barIndex]);
+ this.dispatchEventToListeners(WebInspector.TimelineFrameOverview.Events.SelectionChanged, selection);
+ return true;
},
/**

Powered by Google App Engine
This is Rietveld 408576698