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

Side by Side Diff: Source/devtools/front_end/sdk/TracingManager.js

Issue 1307863003: Add support for returning traces as streams in DevTools protocol (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: extracted test to a separate CL, moved IO from browser_protocol.json to protocol.json Created 5 years, 3 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
« no previous file with comments | « Source/core/inspector/InspectorTracingAgent.cpp ('k') | Source/devtools/protocol.json » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2014 The Chromium Authors. All rights reserved. 2 * Copyright 2014 The Chromium Authors. All rights reserved.
3 * Use of this source code is governed by a BSD-style license that can be 3 * Use of this source code is governed by a BSD-style license that can be
4 * found in the LICENSE file. 4 * found in the LICENSE file.
5 */ 5 */
6 6
7 /** 7 /**
8 * @interface 8 * @interface
9 */ 9 */
10 WebInspector.TracingManagerClient = function() 10 WebInspector.TracingManagerClient = function()
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 ph: string, 51 ph: string,
52 name: string, 52 name: string,
53 args: !Object, 53 args: !Object,
54 dur: number, 54 dur: number,
55 id: number, 55 id: number,
56 s: string 56 s: string
57 }} 57 }}
58 */ 58 */
59 WebInspector.TracingManager.EventPayload; 59 WebInspector.TracingManager.EventPayload;
60 60
61 WebInspector.TracingManager.TransferMode = {
62 ReportEvents: "ReportEvents",
63 ReturnAsStream: "ReturnAsStream"
64 };
65
61 WebInspector.TracingManager.prototype = { 66 WebInspector.TracingManager.prototype = {
62 /** 67 /**
63 * @return {?WebInspector.Target} 68 * @return {?WebInspector.Target}
64 */ 69 */
65 target: function() 70 target: function()
66 { 71 {
67 return this._target; 72 return this._target;
68 }, 73 },
69 74
70 /** 75 /**
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 * @param {string} categoryFilter 110 * @param {string} categoryFilter
106 * @param {string} options 111 * @param {string} options
107 * @param {function(?string)=} callback 112 * @param {function(?string)=} callback
108 */ 113 */
109 start: function(client, categoryFilter, options, callback) 114 start: function(client, categoryFilter, options, callback)
110 { 115 {
111 if (this._activeClient) 116 if (this._activeClient)
112 throw new Error("Tracing is already started"); 117 throw new Error("Tracing is already started");
113 var bufferUsageReportingIntervalMs = 500; 118 var bufferUsageReportingIntervalMs = 500;
114 this._activeClient = client; 119 this._activeClient = client;
115 this._target.tracingAgent().start(categoryFilter, options, bufferUsageRe portingIntervalMs, callback); 120 this._target.tracingAgent().start(categoryFilter, options, bufferUsageRe portingIntervalMs, WebInspector.TracingManager.TransferMode.ReportEvents, callba ck);
116 this._activeClient.tracingStarted(); 121 this._activeClient.tracingStarted();
117 }, 122 },
118 123
119 stop: function() 124 stop: function()
120 { 125 {
121 this._target.tracingAgent().end(); 126 this._target.tracingAgent().end();
122 } 127 }
123 } 128 }
124 129
125 /** 130 /**
(...skipping 28 matching lines...) Expand all
154 }, 159 },
155 160
156 /** 161 /**
157 * @override 162 * @override
158 */ 163 */
159 tracingComplete: function() 164 tracingComplete: function()
160 { 165 {
161 this._tracingManager._tracingComplete(); 166 this._tracingManager._tracingComplete();
162 } 167 }
163 } 168 }
OLDNEW
« no previous file with comments | « Source/core/inspector/InspectorTracingAgent.cpp ('k') | Source/devtools/protocol.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698