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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/animation/AnimationModel.js

Issue 2137773002: [DevTools] Replace the target type with capabilities (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 5 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
OLDNEW
1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 * @constructor 7 * @constructor
8 * @extends {WebInspector.SDKModel} 8 * @extends {WebInspector.SDKModel}
9 * @param {!WebInspector.Target} target 9 * @param {!WebInspector.Target} target
10 */ 10 */
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 this._enabled = true; 195 this._enabled = true;
196 }, 196 },
197 197
198 __proto__: WebInspector.SDKModel.prototype 198 __proto__: WebInspector.SDKModel.prototype
199 } 199 }
200 200
201 WebInspector.AnimationModel._symbol = Symbol("AnimationModel"); 201 WebInspector.AnimationModel._symbol = Symbol("AnimationModel");
202 202
203 /** 203 /**
204 * @param {!WebInspector.Target} target 204 * @param {!WebInspector.Target} target
205 * @return {!WebInspector.AnimationModel} 205 * @return {?WebInspector.AnimationModel}
206 */ 206 */
207 WebInspector.AnimationModel.fromTarget = function(target) 207 WebInspector.AnimationModel.fromTarget = function(target)
208 { 208 {
209 if (!target.hasBrowserCapability())
210 return null;
209 if (!target[WebInspector.AnimationModel._symbol]) 211 if (!target[WebInspector.AnimationModel._symbol])
210 target[WebInspector.AnimationModel._symbol] = new WebInspector.Animation Model(target); 212 target[WebInspector.AnimationModel._symbol] = new WebInspector.Animation Model(target);
211 213
212 return target[WebInspector.AnimationModel._symbol]; 214 return target[WebInspector.AnimationModel._symbol];
213 } 215 }
214 216
215 /** 217 /**
216 * @constructor 218 * @constructor
217 * @extends {WebInspector.SDKObject} 219 * @extends {WebInspector.SDKObject}
218 * @param {!WebInspector.Target} target 220 * @param {!WebInspector.Target} target
(...skipping 724 matching lines...) Expand 10 before | Expand all | Expand 10 after
943 if (!this._capturing) 945 if (!this._capturing)
944 return; 946 return;
945 947
946 delete this._stopTimer; 948 delete this._stopTimer;
947 delete this._endTime; 949 delete this._endTime;
948 this._requests = []; 950 this._requests = [];
949 this._capturing = false; 951 this._capturing = false;
950 this._target.pageAgent().stopScreencast(); 952 this._target.pageAgent().stopScreencast();
951 } 953 }
952 } 954 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698