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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/ui/View.js

Issue 2450663004: DevTools: do not allow using 'this' before call into super. (Closed)
Patch Set: rebaselined 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 * @interface 6 * @interface
7 */ 7 */
8 WebInspector.View = function() 8 WebInspector.View = function()
9 { 9 {
10 }; 10 };
(...skipping 585 matching lines...) Expand 10 before | Expand all | Expand 10 after
596 * @extends {WebInspector.ViewManager._Location} 596 * @extends {WebInspector.ViewManager._Location}
597 * @implements {WebInspector.TabbedViewLocation} 597 * @implements {WebInspector.TabbedViewLocation}
598 * @param {!WebInspector.ViewManager} manager 598 * @param {!WebInspector.ViewManager} manager
599 * @param {function()=} revealCallback 599 * @param {function()=} revealCallback
600 * @param {string=} location 600 * @param {string=} location
601 * @param {boolean=} restoreSelection 601 * @param {boolean=} restoreSelection
602 * @param {boolean=} allowReorder 602 * @param {boolean=} allowReorder
603 */ 603 */
604 WebInspector.ViewManager._TabbedLocation = function(manager, revealCallback, loc ation, restoreSelection, allowReorder) 604 WebInspector.ViewManager._TabbedLocation = function(manager, revealCallback, loc ation, restoreSelection, allowReorder)
605 { 605 {
606 this._tabbedPane = new WebInspector.TabbedPane(); 606 var tabbedPane = new WebInspector.TabbedPane();
607 if (allowReorder) 607 if (allowReorder)
608 this._tabbedPane.setAllowTabReorder(true); 608 tabbedPane.setAllowTabReorder(true);
609
610 WebInspector.ViewManager._Location.call(this, manager, tabbedPane, revealCal lback);
611 this._tabbedPane = tabbedPane;
609 this._allowReorder = allowReorder; 612 this._allowReorder = allowReorder;
610 WebInspector.ViewManager._Location.call(this, manager, this._tabbedPane, rev ealCallback);
611 613
612 this._tabbedPane.addEventListener(WebInspector.TabbedPane.Events.TabSelected , this._tabSelected, this); 614 this._tabbedPane.addEventListener(WebInspector.TabbedPane.Events.TabSelected , this._tabSelected, this);
613 this._tabbedPane.addEventListener(WebInspector.TabbedPane.Events.TabClosed, this._tabClosed, this); 615 this._tabbedPane.addEventListener(WebInspector.TabbedPane.Events.TabClosed, this._tabClosed, this);
614 this._closeableTabSetting = WebInspector.settings.createSetting(location + " -closeableTabs", {}); 616 this._closeableTabSetting = WebInspector.settings.createSetting(location + " -closeableTabs", {});
615 this._tabOrderSetting = WebInspector.settings.createSetting(location + "-tab Order", {}); 617 this._tabOrderSetting = WebInspector.settings.createSetting(location + "-tab Order", {});
616 this._tabbedPane.addEventListener(WebInspector.TabbedPane.Events.TabOrderCha nged, this._persistTabOrder, this); 618 this._tabbedPane.addEventListener(WebInspector.TabbedPane.Events.TabOrderCha nged, this._persistTabOrder, this);
617 if (restoreSelection) 619 if (restoreSelection)
618 this._lastSelectedTabSetting = WebInspector.settings.createSetting(locat ion + "-selectedTab", ""); 620 this._lastSelectedTabSetting = WebInspector.settings.createSetting(locat ion + "-selectedTab", "");
619 621
620 /** @type {!Map.<string, !WebInspector.View>} */ 622 /** @type {!Map.<string, !WebInspector.View>} */
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
834 /** 836 /**
835 * @constructor 837 * @constructor
836 * @extends {WebInspector.ViewManager._Location} 838 * @extends {WebInspector.ViewManager._Location}
837 * @implements {WebInspector.ViewLocation} 839 * @implements {WebInspector.ViewLocation}
838 * @param {!WebInspector.ViewManager} manager 840 * @param {!WebInspector.ViewManager} manager
839 * @param {function()=} revealCallback 841 * @param {function()=} revealCallback
840 * @param {string=} location 842 * @param {string=} location
841 */ 843 */
842 WebInspector.ViewManager._StackLocation = function(manager, revealCallback, loca tion) 844 WebInspector.ViewManager._StackLocation = function(manager, revealCallback, loca tion)
843 { 845 {
844 this._vbox = new WebInspector.VBox(); 846 var vbox = new WebInspector.VBox();
845 WebInspector.ViewManager._Location.call(this, manager, this._vbox, revealCal lback); 847 WebInspector.ViewManager._Location.call(this, manager, vbox, revealCallback) ;
848 this._vbox = vbox;
846 849
847 /** @type {!Map<string, !WebInspector.ViewManager._ExpandableContainerWidget >} */ 850 /** @type {!Map<string, !WebInspector.ViewManager._ExpandableContainerWidget >} */
848 this._expandableContainers = new Map(); 851 this._expandableContainers = new Map();
849 852
850 if (location) 853 if (location)
851 this.appendApplicableItems(location); 854 this.appendApplicableItems(location);
852 }; 855 };
853 856
854 WebInspector.ViewManager._StackLocation.prototype = { 857 WebInspector.ViewManager._StackLocation.prototype = {
855 858
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
914 this.appendView(view); 917 this.appendView(view);
915 }, 918 },
916 919
917 __proto__: WebInspector.ViewManager._Location.prototype 920 __proto__: WebInspector.ViewManager._Location.prototype
918 }; 921 };
919 922
920 /** 923 /**
921 * @type {!WebInspector.ViewManager} 924 * @type {!WebInspector.ViewManager}
922 */ 925 */
923 WebInspector.viewManager; 926 WebInspector.viewManager;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698