Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / Source / devtools / front_end / timeline / TimelineModelImpl.js
index e427b1f..167135e 100644 (file)
@@ -42,11 +42,11 @@ WebInspector.TimelineModelImpl.prototype = {
     },
 
     /**
-     * @param {boolean} captureStacks
+     * @param {boolean} captureCauses
      * @param {boolean} captureMemory
      * @param {boolean} capturePictures
      */
-    startRecording: function(captureStacks, captureMemory, capturePictures)
+    startRecording: function(captureCauses, captureMemory, capturePictures)
     {
         console.assert(!capturePictures, "Legacy timeline does not support capturing pictures");
         this.reset();
@@ -54,7 +54,7 @@ WebInspector.TimelineModelImpl.prototype = {
         console.assert(this._currentTarget);
 
         this._clientInitiatedRecording = true;
-        var maxStackFrames = captureStacks ? 30 : 0;
+        var maxStackFrames = captureCauses ? 30 : 0;
         var includeGPUEvents = Runtime.experiments.isEnabled("gpuTimeline");
         var liveEvents = [ WebInspector.TimelineModel.RecordType.BeginFrame,
                            WebInspector.TimelineModel.RecordType.DrawFrame,
@@ -139,7 +139,7 @@ WebInspector.TimelineModelImpl.prototype = {
 
         if (event.data.consoleTimeline) {
             // Stopped from console.
-            this._fireRecordingStopped(null, null);
+            this._fireRecordingStopped(null);
         }
 
         this._collectionEnabled = false;
@@ -163,12 +163,9 @@ WebInspector.TimelineModelImpl.prototype = {
 
     /**
      * @param {?Protocol.Error} error
-     * @param {?ProfilerAgent.CPUProfile} cpuProfile
      */
-    _fireRecordingStopped: function(error, cpuProfile)
+    _fireRecordingStopped: function(error)
     {
-        if (cpuProfile)
-            WebInspector.TimelineJSProfileProcessor.mergeJSProfileIntoTimeline(this, cpuProfile);
         this.dispatchEventToListeners(WebInspector.TimelineModel.Events.RecordingStopped);
     },
 
@@ -236,10 +233,42 @@ WebInspector.TimelineModelImpl.prototype = {
         this._payloads = [];
         this._stringPool = {};
         this._bindings._reset();
+        this._minimumRecordTime = 0;
+        this._maximumRecordTime = 0;
         WebInspector.TimelineModel.prototype.reset.call(this);
     },
 
     /**
+     * @return {number}
+     */
+    minimumRecordTime: function()
+    {
+        return this._minimumRecordTime;
+    },
+
+    /**
+     * @return {number}
+     */
+    maximumRecordTime: function()
+    {
+        return this._maximumRecordTime;
+    },
+
+    /**
+     * @param {!WebInspector.TimelineModel.Record} record
+     */
+    _updateBoundaries: function(record)
+    {
+        var startTime = record.startTime();
+        var endTime = record.endTime();
+
+        if (!this._minimumRecordTime || startTime < this._minimumRecordTime)
+            this._minimumRecordTime = startTime;
+        if (endTime > this._maximumRecordTime)
+            this._maximumRecordTime = endTime;
+    },
+
+    /**
      * @param {!TimelineAgent.TimelineEvent} record
      */
     _internStrings: function(record)
@@ -495,7 +524,7 @@ WebInspector.TimelineModel.RecordImpl.prototype = {
     setUserObject: function(key, value)
     {
         if (!this._userObjects)
-            this._userObjects = new StringMap();
+            this._userObjects = new Map();
         this._userObjects.set(key, value);
     },