| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
| 3 * Copyright (C) 2012 Intel Inc. All rights reserved. | 3 * Copyright (C) 2012 Intel Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
| 7 * met: | 7 * met: |
| 8 * | 8 * |
| 9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 1984 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1995 | 1995 |
| 1996 /** | 1996 /** |
| 1997 * @constructor | 1997 * @constructor |
| 1998 * @extends {WebInspector.Object} | 1998 * @extends {WebInspector.Object} |
| 1999 * @implements {WebInspector.TargetManager.Observer} | 1999 * @implements {WebInspector.TargetManager.Observer} |
| 2000 */ | 2000 */ |
| 2001 WebInspector.CPUThrottlingManager = function() | 2001 WebInspector.CPUThrottlingManager = function() |
| 2002 { | 2002 { |
| 2003 this._targets = []; | 2003 this._targets = []; |
| 2004 this._throttlingRate = 1.; // No throttling | 2004 this._throttlingRate = 1.; // No throttling |
| 2005 WebInspector.targetManager.observeTargets(this, WebInspector.Target.Type.Pag
e); | 2005 WebInspector.targetManager.observeTargets(this, WebInspector.Target.Capabili
ty.Browser); |
| 2006 } | 2006 } |
| 2007 | 2007 |
| 2008 WebInspector.CPUThrottlingManager.prototype = { | 2008 WebInspector.CPUThrottlingManager.prototype = { |
| 2009 /** | 2009 /** |
| 2010 * @param {number} value | 2010 * @param {number} value |
| 2011 */ | 2011 */ |
| 2012 setRate: function(value) | 2012 setRate: function(value) |
| 2013 { | 2013 { |
| 2014 this._throttlingRate = value; | 2014 this._throttlingRate = value; |
| 2015 this._targets.forEach(target => target.emulationAgent().setCPUThrottling
Rate(value)); | 2015 this._targets.forEach(target => target.emulationAgent().setCPUThrottling
Rate(value)); |
| (...skipping 21 matching lines...) Expand all Loading... |
| 2037 * @override | 2037 * @override |
| 2038 * @param {!WebInspector.Target} target | 2038 * @param {!WebInspector.Target} target |
| 2039 */ | 2039 */ |
| 2040 targetRemoved: function(target) | 2040 targetRemoved: function(target) |
| 2041 { | 2041 { |
| 2042 this._targets.remove(target, true); | 2042 this._targets.remove(target, true); |
| 2043 }, | 2043 }, |
| 2044 | 2044 |
| 2045 __proto__: WebInspector.Object.prototype | 2045 __proto__: WebInspector.Object.prototype |
| 2046 } | 2046 } |
| OLD | NEW |