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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/timeline/TimelinePanel.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 /* 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
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698