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 10 matching lines...) Expand all Loading... |
21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | 21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | 22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | 23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
29 */ | 29 */ |
30 | 30 |
| 31 importScript("EditFileSystemDialog.js"); |
| 32 |
31 /** | 33 /** |
32 * @constructor | 34 * @constructor |
33 * @param {!function()} onHide | 35 * @param {!function()} onHide |
34 * @extends {WebInspector.HelpScreen} | 36 * @extends {WebInspector.HelpScreen} |
35 */ | 37 */ |
36 WebInspector.SettingsScreen = function(onHide) | 38 WebInspector.SettingsScreen = function(onHide) |
37 { | 39 { |
38 WebInspector.HelpScreen.call(this); | 40 WebInspector.HelpScreen.call(this); |
39 this.element.id = "settings-screen"; | 41 this.element.id = "settings-screen"; |
40 | 42 |
(...skipping 570 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
611 }, | 613 }, |
612 | 614 |
613 __proto__: WebInspector.SettingsTab.prototype | 615 __proto__: WebInspector.SettingsTab.prototype |
614 } | 616 } |
615 | 617 |
616 /** | 618 /** |
617 * @constructor | 619 * @constructor |
618 */ | 620 */ |
619 WebInspector.SettingsController = function() | 621 WebInspector.SettingsController = function() |
620 { | 622 { |
621 this._statusBarButton = new WebInspector.StatusBarButton(WebInspector.UIStri
ng("Settings"), "settings-status-bar-item"); | |
622 this._statusBarButton.element.addEventListener("mouseup", this._mouseUp.bind
(this), false); | |
623 | |
624 /** @type {?WebInspector.SettingsScreen} */ | 623 /** @type {?WebInspector.SettingsScreen} */ |
625 this._settingsScreen; | 624 this._settingsScreen; |
| 625 |
| 626 window.addEventListener("resize", this._resize.bind(this), true); |
626 } | 627 } |
627 | 628 |
628 WebInspector.SettingsController.prototype = | 629 WebInspector.SettingsController.prototype = |
629 { | 630 { |
630 /** | |
631 * @return {!Element} | |
632 */ | |
633 get statusBarItem() | |
634 { | |
635 return this._statusBarButton.element; | |
636 }, | |
637 | |
638 _mouseUp: function() | |
639 { | |
640 this.showSettingsScreen(); | |
641 }, | |
642 | |
643 _onHideSettingsScreen: function() | 631 _onHideSettingsScreen: function() |
644 { | 632 { |
645 delete this._settingsScreenVisible; | 633 delete this._settingsScreenVisible; |
646 }, | 634 }, |
647 | 635 |
648 /** | 636 /** |
649 * @param {string=} tabId | 637 * @param {string=} tabId |
650 */ | 638 */ |
651 showSettingsScreen: function(tabId) | 639 showSettingsScreen: function(tabId) |
652 { | 640 { |
653 if (!this._settingsScreen) | 641 if (!this._settingsScreen) |
654 this._settingsScreen = new WebInspector.SettingsScreen(this._onHideS
ettingsScreen.bind(this)); | 642 this._settingsScreen = new WebInspector.SettingsScreen(this._onHideS
ettingsScreen.bind(this)); |
655 | 643 |
656 if (tabId) | 644 if (tabId) |
657 this._settingsScreen.selectTab(tabId); | 645 this._settingsScreen.selectTab(tabId); |
658 | 646 |
659 this._settingsScreen.showModal(); | 647 this._settingsScreen.showModal(); |
660 this._settingsScreenVisible = true; | 648 this._settingsScreenVisible = true; |
661 }, | 649 }, |
662 | 650 |
663 resize: function() | 651 _resize: function() |
664 { | 652 { |
665 if (this._settingsScreen && this._settingsScreen.isShowing()) | 653 if (this._settingsScreen && this._settingsScreen.isShowing()) |
666 this._settingsScreen.doResize(); | 654 this._settingsScreen.doResize(); |
667 } | 655 } |
668 } | 656 } |
669 | 657 |
670 /** | 658 /** |
671 * @constructor | 659 * @constructor |
672 * @implements {WebInspector.ActionDelegate} | 660 * @implements {WebInspector.ActionDelegate} |
673 */ | 661 */ |
674 WebInspector.SettingsController.SettingsScreenActionDelegate = function() { } | 662 WebInspector.SettingsController.SettingsScreenActionDelegate = function() { } |
675 | 663 |
676 WebInspector.SettingsController.SettingsScreenActionDelegate.prototype = { | 664 WebInspector.SettingsController.SettingsScreenActionDelegate.prototype = { |
677 /** | 665 /** |
678 * @return {boolean} | 666 * @return {boolean} |
679 */ | 667 */ |
680 handleAction: function() | 668 handleAction: function() |
681 { | 669 { |
682 WebInspector.settingsController.showSettingsScreen(WebInspector.Settings
Screen.Tabs.General); | 670 WebInspector._settingsController.showSettingsScreen(WebInspector.Setting
sScreen.Tabs.General); |
683 return true; | 671 return true; |
684 } | 672 } |
685 } | 673 } |
686 | 674 |
687 /** | 675 /** |
688 * @constructor | 676 * @constructor |
689 * @extends {WebInspector.Object} | 677 * @extends {WebInspector.Object} |
690 * @param {function(!Element, string, ?string)} itemRenderer | 678 * @param {function(!Element, string, ?string)} itemRenderer |
691 */ | 679 */ |
692 WebInspector.SettingsList = function(columns, itemRenderer) | 680 WebInspector.SettingsList = function(columns, itemRenderer) |
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1064 for (var i = 0; i < columns.length; ++i) { | 1052 for (var i = 0; i < columns.length; ++i) { |
1065 var columnId = columns[i]; | 1053 var columnId = columns[i]; |
1066 var inputElement = this._addInputElements[columnId]; | 1054 var inputElement = this._addInputElements[columnId]; |
1067 inputElement.value = ""; | 1055 inputElement.value = ""; |
1068 } | 1056 } |
1069 }, | 1057 }, |
1070 | 1058 |
1071 __proto__: WebInspector.SettingsList.prototype | 1059 __proto__: WebInspector.SettingsList.prototype |
1072 } | 1060 } |
1073 | 1061 |
1074 /** @type {!WebInspector.SettingsController} */ | 1062 WebInspector._settingsController = new WebInspector.SettingsController(); |
1075 WebInspector.settingsController; | |
OLD | NEW |