| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 * @implements {WebInspector.ViewLocationResolver} | 34 * @implements {WebInspector.ViewLocationResolver} |
| 35 */ | 35 */ |
| 36 WebInspector.SettingsScreen = function() | 36 WebInspector.SettingsScreen = function() |
| 37 { | 37 { |
| 38 WebInspector.VBox.call(this, true); | 38 WebInspector.VBox.call(this, true); |
| 39 this.registerRequiredCSS("settings/settingsScreen.css"); | 39 this.registerRequiredCSS("settings/settingsScreen.css"); |
| 40 | 40 |
| 41 this.contentElement.tabIndex = 0; | 41 this.contentElement.tabIndex = 0; |
| 42 this.contentElement.classList.add("help-window-main"); | 42 this.contentElement.classList.add("help-window-main"); |
| 43 this.contentElement.classList.add("vbox"); | 43 this.contentElement.classList.add("vbox"); |
| 44 var settingsLabelElement = createElementWithClass("div", "help-window-label"
); | 44 |
| 45 settingsLabelElement.createTextChild(WebInspector.UIString("Settings")); | 45 var settingsLabelElement = createElement("div"); |
| 46 WebInspector.createShadowRootWithCoreStyles(settingsLabelElement, "settings/
settingsScreen.css").createChild("div", "settings-window-title").textContent = W
ebInspector.UIString("Settings"); |
| 46 | 47 |
| 47 this._tabbedLocation = WebInspector.viewManager.createTabbedLocation(() => W
ebInspector.SettingsScreen._showSettingsScreen(), "settings-view"); | 48 this._tabbedLocation = WebInspector.viewManager.createTabbedLocation(() => W
ebInspector.SettingsScreen._showSettingsScreen(), "settings-view"); |
| 48 var tabbedPane = this._tabbedLocation.tabbedPane(); | 49 var tabbedPane = this._tabbedLocation.tabbedPane(); |
| 49 tabbedPane.insertBeforeTabStrip(settingsLabelElement); | 50 tabbedPane.leftToolbar().appendToolbarItem(new WebInspector.ToolbarItem(sett
ingsLabelElement)); |
| 50 tabbedPane.setShrinkableTabs(false); | 51 tabbedPane.setShrinkableTabs(false); |
| 51 tabbedPane.setVerticalTabLayout(true); | 52 tabbedPane.setVerticalTabLayout(true); |
| 52 var shortcutsView = new WebInspector.SimpleView(WebInspector.UIString("Short
cuts")); | 53 var shortcutsView = new WebInspector.SimpleView(WebInspector.UIString("Short
cuts")); |
| 53 WebInspector.shortcutsScreen.createShortcutsTabView().show(shortcutsView.ele
ment); | 54 WebInspector.shortcutsScreen.createShortcutsTabView().show(shortcutsView.ele
ment); |
| 54 this._tabbedLocation.appendView(shortcutsView); | 55 this._tabbedLocation.appendView(shortcutsView); |
| 55 tabbedPane.show(this.contentElement); | 56 tabbedPane.show(this.contentElement); |
| 56 | 57 |
| 57 this.element.addEventListener("keydown", this._keyDown.bind(this), false); | 58 this.element.addEventListener("keydown", this._keyDown.bind(this), false); |
| 58 this._developerModeCounter = 0; | 59 this._developerModeCounter = 0; |
| 59 this.setDefaultFocusedElement(this.contentElement); | 60 this.setDefaultFocusedElement(this.contentElement); |
| (...skipping 513 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 573 return; | 574 return; |
| 574 var settings = extension.descriptor()["settings"]; | 575 var settings = extension.descriptor()["settings"]; |
| 575 if (settings && settings.indexOf(setting.name) !== -1) { | 576 if (settings && settings.indexOf(setting.name) !== -1) { |
| 576 InspectorFrontendHost.bringToFront(); | 577 InspectorFrontendHost.bringToFront(); |
| 577 WebInspector.SettingsScreen._showSettingsScreen(extension.descri
ptor()["id"]); | 578 WebInspector.SettingsScreen._showSettingsScreen(extension.descri
ptor()["id"]); |
| 578 success = true; | 579 success = true; |
| 579 } | 580 } |
| 580 } | 581 } |
| 581 } | 582 } |
| 582 } | 583 } |
| OLD | NEW |