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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/profiler/TargetsComboBoxController.js

Issue 2440953003: DevTools: use semicolons after each statement. (Closed)
Patch Set: rebaseline Created 4 years, 1 month 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 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 * @constructor 6 * @constructor
7 * @implements {WebInspector.TargetManager.Observer} 7 * @implements {WebInspector.TargetManager.Observer}
8 * @param {!Element} selectElement 8 * @param {!Element} selectElement
9 * @param {!Element} elementToHide 9 * @param {!Element} elementToHide
10 */ 10 */
11 WebInspector.TargetsComboBoxController = function(selectElement, elementToHide) 11 WebInspector.TargetsComboBoxController = function(selectElement, elementToHide)
12 { 12 {
13 elementToHide.classList.add("hidden"); 13 elementToHide.classList.add("hidden");
14 selectElement.addEventListener("change", this._onComboBoxSelectionChange.bin d(this), false); 14 selectElement.addEventListener("change", this._onComboBoxSelectionChange.bin d(this), false);
15 this._selectElement = selectElement; 15 this._selectElement = selectElement;
16 this._elementToHide = elementToHide; 16 this._elementToHide = elementToHide;
17 /** @type {!Map.<!WebInspector.Target, !Element>} */ 17 /** @type {!Map.<!WebInspector.Target, !Element>} */
18 this._targetToOption = new Map(); 18 this._targetToOption = new Map();
19 19
20 WebInspector.context.addFlavorChangeListener(WebInspector.Target, this._targ etChangedExternally, this); 20 WebInspector.context.addFlavorChangeListener(WebInspector.Target, this._targ etChangedExternally, this);
21 WebInspector.targetManager.addEventListener(WebInspector.TargetManager.Event s.NameChanged, this._targetNameChanged, this); 21 WebInspector.targetManager.addEventListener(WebInspector.TargetManager.Event s.NameChanged, this._targetNameChanged, this);
22 WebInspector.targetManager.observeTargets(this, WebInspector.Target.Capabili ty.JS); 22 WebInspector.targetManager.observeTargets(this, WebInspector.Target.Capabili ty.JS);
23 } 23 };
24 24
25 WebInspector.TargetsComboBoxController.prototype = { 25 WebInspector.TargetsComboBoxController.prototype = {
26 26
27 /** 27 /**
28 * @override 28 * @override
29 * @param {!WebInspector.Target} target 29 * @param {!WebInspector.Target} target
30 */ 30 */
31 targetAdded: function(target) 31 targetAdded: function(target)
32 { 32 {
33 var option = this._selectElement.createChild("option"); 33 var option = this._selectElement.createChild("option");
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 }, 89 },
90 90
91 /** 91 /**
92 * @param {!Element} option 92 * @param {!Element} option
93 */ 93 */
94 _select: function(option) 94 _select: function(option)
95 { 95 {
96 this._selectElement.selectedIndex = Array.prototype.indexOf.call(/** @ty pe {?} */ (this._selectElement), option); 96 this._selectElement.selectedIndex = Array.prototype.indexOf.call(/** @ty pe {?} */ (this._selectElement), option);
97 } 97 }
98 98
99 } 99 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698