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

Side by Side Diff: Source/devtools/front_end/components/TargetsComboBoxController.js

Issue 472453002: DevTools: move "Workers in main window" out of experiments (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 4 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 | Annotate | Revision Log
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 if (!WebInspector.experimentsSettings.workersInMainWindow.isEnabled())
20 return;
21 19
22 WebInspector.context.addFlavorChangeListener(WebInspector.Target, this._targ etChangedExternally, this); 20 WebInspector.context.addFlavorChangeListener(WebInspector.Target, this._targ etChangedExternally, this);
23 WebInspector.targetManager.observeTargets(this); 21 WebInspector.targetManager.observeTargets(this);
24 } 22 }
25 23
26 WebInspector.TargetsComboBoxController.prototype = { 24 WebInspector.TargetsComboBoxController.prototype = {
27 25
28 /** 26 /**
29 * @param {!WebInspector.Target} target 27 * @param {!WebInspector.Target} target
30 */ 28 */
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 77
80 /** 78 /**
81 * @param {!Element} option 79 * @param {!Element} option
82 */ 80 */
83 _select: function(option) 81 _select: function(option)
84 { 82 {
85 this._selectElement.selectedIndex = Array.prototype.indexOf.call(/** @ty pe {?} */ (this._selectElement), option); 83 this._selectElement.selectedIndex = Array.prototype.indexOf.call(/** @ty pe {?} */ (this._selectElement), option);
86 } 84 }
87 85
88 } 86 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/common/Settings.js ('k') | Source/devtools/front_end/components/WorkerFrontendManager.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698