OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 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 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * | 10 * |
(...skipping 814 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
825 this._forceUpdateLayout(); | 825 this._forceUpdateLayout(); |
826 } | 826 } |
827 | 827 |
828 /** | 828 /** |
829 * @param {string} title | 829 * @param {string} title |
830 * @return {!UI.ToolbarButton} | 830 * @return {!UI.ToolbarButton} |
831 */ | 831 */ |
832 createShowHideSidebarButton(title) { | 832 createShowHideSidebarButton(title) { |
833 this._showHideSidebarButtonTitle = Common.UIString(title); | 833 this._showHideSidebarButtonTitle = Common.UIString(title); |
834 this._showHideSidebarButton = new UI.ToolbarButton('', ''); | 834 this._showHideSidebarButton = new UI.ToolbarButton('', ''); |
835 this._showHideSidebarButton.addEventListener('click', buttonClicked.bind(thi
s)); | 835 this._showHideSidebarButton.addEventListener(UI.ToolbarButton.Events.Click,
buttonClicked, this); |
836 this._updateShowHideSidebarButton(); | 836 this._updateShowHideSidebarButton(); |
837 | 837 |
838 /** | 838 /** |
839 * @param {!Common.Event} event | 839 * @param {!Common.Event} event |
840 * @this {UI.SplitWidget} | 840 * @this {UI.SplitWidget} |
841 */ | 841 */ |
842 function buttonClicked(event) { | 842 function buttonClicked(event) { |
843 if (this._showMode !== UI.SplitWidget.ShowMode.Both) | 843 if (this._showMode !== UI.SplitWidget.ShowMode.Both) |
844 this.showBoth(true); | 844 this.showBoth(true); |
845 else | 845 else |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
879 OnlySidebar: 'OnlySidebar' | 879 OnlySidebar: 'OnlySidebar' |
880 }; | 880 }; |
881 | 881 |
882 /** @enum {symbol} */ | 882 /** @enum {symbol} */ |
883 UI.SplitWidget.Events = { | 883 UI.SplitWidget.Events = { |
884 SidebarSizeChanged: Symbol('SidebarSizeChanged'), | 884 SidebarSizeChanged: Symbol('SidebarSizeChanged'), |
885 ShowModeChanged: Symbol('ShowModeChanged') | 885 ShowModeChanged: Symbol('ShowModeChanged') |
886 }; | 886 }; |
887 | 887 |
888 UI.SplitWidget.MinPadding = 20; | 888 UI.SplitWidget.MinPadding = 20; |
OLD | NEW |