| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. |
| 3 * Copyright (C) 2011 Google Inc. All rights reserved. | 3 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 this._navigator.view.show(this.editorView.sidebarElement()); | 60 this._navigator.view.show(this.editorView.sidebarElement()); |
| 61 this._navigator.addEventListener(WebInspector.SourcesNavigator.Events.Source
Selected, this._sourceSelected, this); | 61 this._navigator.addEventListener(WebInspector.SourcesNavigator.Events.Source
Selected, this._sourceSelected, this); |
| 62 this._navigator.addEventListener(WebInspector.SourcesNavigator.Events.Source
Renamed, this._sourceRenamed, this); | 62 this._navigator.addEventListener(WebInspector.SourcesNavigator.Events.Source
Renamed, this._sourceRenamed, this); |
| 63 | 63 |
| 64 this._sourcesView = new WebInspector.SourcesView(this._workspace, this); | 64 this._sourcesView = new WebInspector.SourcesView(this._workspace, this); |
| 65 this._sourcesView.addEventListener(WebInspector.SourcesView.Events.EditorSel
ected, this._editorSelected.bind(this)); | 65 this._sourcesView.addEventListener(WebInspector.SourcesView.Events.EditorSel
ected, this._editorSelected.bind(this)); |
| 66 this._sourcesView.addEventListener(WebInspector.SourcesView.Events.EditorClo
sed, this._editorClosed.bind(this)); | 66 this._sourcesView.addEventListener(WebInspector.SourcesView.Events.EditorClo
sed, this._editorClosed.bind(this)); |
| 67 this._sourcesView.registerShortcuts(this.registerShortcuts.bind(this)); | 67 this._sourcesView.registerShortcuts(this.registerShortcuts.bind(this)); |
| 68 this._sourcesView.show(this.editorView.mainElement()); | 68 this._sourcesView.show(this.editorView.mainElement()); |
| 69 | 69 |
| 70 this._debugSidebarResizeWidgetElement = document.createElementWithClass("div
", "resizer-widget"); | 70 this._debugSidebarResizeWidgetElement = createElementWithClass("div", "resiz
er-widget"); |
| 71 this._debugSidebarResizeWidgetElement.id = "scripts-debug-sidebar-resizer-wi
dget"; | 71 this._debugSidebarResizeWidgetElement.id = "scripts-debug-sidebar-resizer-wi
dget"; |
| 72 this._splitView.addEventListener(WebInspector.SplitView.Events.ShowModeChang
ed, this._updateDebugSidebarResizeWidget, this); | 72 this._splitView.addEventListener(WebInspector.SplitView.Events.ShowModeChang
ed, this._updateDebugSidebarResizeWidget, this); |
| 73 this._updateDebugSidebarResizeWidget(); | 73 this._updateDebugSidebarResizeWidget(); |
| 74 this._splitView.installResizer(this._debugSidebarResizeWidgetElement); | 74 this._splitView.installResizer(this._debugSidebarResizeWidgetElement); |
| 75 | 75 |
| 76 this.sidebarPanes = {}; | 76 this.sidebarPanes = {}; |
| 77 this.sidebarPanes.threads = new WebInspector.ThreadsSidebarPane(); | 77 this.sidebarPanes.threads = new WebInspector.ThreadsSidebarPane(); |
| 78 this.sidebarPanes.watchExpressions = new WebInspector.WatchExpressionsSideba
rPane(); | 78 this.sidebarPanes.watchExpressions = new WebInspector.WatchExpressionsSideba
rPane(); |
| 79 this.sidebarPanes.callstack = new WebInspector.CallStackSidebarPane(); | 79 this.sidebarPanes.callstack = new WebInspector.CallStackSidebarPane(); |
| 80 this.sidebarPanes.callstack.addEventListener(WebInspector.CallStackSidebarPa
ne.Events.CallFrameSelected, this._callFrameSelectedInSidebar.bind(this)); | 80 this.sidebarPanes.callstack.addEventListener(WebInspector.CallStackSidebarPa
ne.Events.CallFrameSelected, this._callFrameSelectedInSidebar.bind(this)); |
| (...skipping 540 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 621 this.sidebarPanes.jsBreakpoints.listElement.classList.toggle("breakpoint
s-list-deactivated", !active); | 621 this.sidebarPanes.jsBreakpoints.listElement.classList.toggle("breakpoint
s-list-deactivated", !active); |
| 622 this._sourcesView.toggleBreakpointsActiveState(active); | 622 this._sourcesView.toggleBreakpointsActiveState(active); |
| 623 if (active) | 623 if (active) |
| 624 this._toggleBreakpointsButton.title = WebInspector.UIString("Deactiv
ate breakpoints."); | 624 this._toggleBreakpointsButton.title = WebInspector.UIString("Deactiv
ate breakpoints."); |
| 625 else | 625 else |
| 626 this._toggleBreakpointsButton.title = WebInspector.UIString("Activat
e breakpoints."); | 626 this._toggleBreakpointsButton.title = WebInspector.UIString("Activat
e breakpoints."); |
| 627 }, | 627 }, |
| 628 | 628 |
| 629 _createDebugToolbar: function() | 629 _createDebugToolbar: function() |
| 630 { | 630 { |
| 631 var debugToolbar = document.createElementWithClass("div", "scripts-debug
-toolbar"); | 631 var debugToolbar = createElementWithClass("div", "scripts-debug-toolbar"
); |
| 632 | 632 |
| 633 var title, handler; | 633 var title, handler; |
| 634 var platformSpecificModifier = WebInspector.KeyboardShortcut.Modifiers.C
trlOrMeta; | 634 var platformSpecificModifier = WebInspector.KeyboardShortcut.Modifiers.C
trlOrMeta; |
| 635 | 635 |
| 636 // Run snippet. | 636 // Run snippet. |
| 637 title = WebInspector.UIString("Run snippet (%s)."); | 637 title = WebInspector.UIString("Run snippet (%s)."); |
| 638 handler = this._runSnippet.bind(this); | 638 handler = this._runSnippet.bind(this); |
| 639 this._runSnippetButton = this._createButtonAndRegisterShortcuts("scripts
-run-snippet", title, handler, WebInspector.ShortcutsScreen.SourcesPanelShortcut
s.RunSnippet); | 639 this._runSnippetButton = this._createButtonAndRegisterShortcuts("scripts
-run-snippet", title, handler, WebInspector.ShortcutsScreen.SourcesPanelShortcut
s.RunSnippet); |
| 640 debugToolbar.appendChild(this._runSnippetButton.element); | 640 debugToolbar.appendChild(this._runSnippetButton.element); |
| 641 this._runSnippetButton.element.classList.add("hidden"); | 641 this._runSnippetButton.element.classList.add("hidden"); |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 676 // Pause on Exception | 676 // Pause on Exception |
| 677 this._pauseOnExceptionButton = new WebInspector.StatusBarButton("", "scr
ipts-pause-on-exceptions-status-bar-item"); | 677 this._pauseOnExceptionButton = new WebInspector.StatusBarButton("", "scr
ipts-pause-on-exceptions-status-bar-item"); |
| 678 this._pauseOnExceptionButton.addEventListener("click", this._togglePause
OnExceptions, this); | 678 this._pauseOnExceptionButton.addEventListener("click", this._togglePause
OnExceptions, this); |
| 679 debugToolbar.appendChild(this._pauseOnExceptionButton.element); | 679 debugToolbar.appendChild(this._pauseOnExceptionButton.element); |
| 680 | 680 |
| 681 return debugToolbar; | 681 return debugToolbar; |
| 682 }, | 682 }, |
| 683 | 683 |
| 684 _createDebugToolbarDrawer: function() | 684 _createDebugToolbarDrawer: function() |
| 685 { | 685 { |
| 686 var debugToolbarDrawer = document.createElementWithClass("div", "scripts
-debug-toolbar-drawer"); | 686 var debugToolbarDrawer = createElementWithClass("div", "scripts-debug-to
olbar-drawer"); |
| 687 | 687 |
| 688 var label = WebInspector.UIString("Pause On Caught Exceptions"); | 688 var label = WebInspector.UIString("Pause On Caught Exceptions"); |
| 689 var setting = WebInspector.settings.pauseOnCaughtException; | 689 var setting = WebInspector.settings.pauseOnCaughtException; |
| 690 debugToolbarDrawer.appendChild(WebInspector.SettingsUI.createSettingChec
kbox(label, setting, true)); | 690 debugToolbarDrawer.appendChild(WebInspector.SettingsUI.createSettingChec
kbox(label, setting, true)); |
| 691 | 691 |
| 692 return debugToolbarDrawer; | 692 return debugToolbarDrawer; |
| 693 }, | 693 }, |
| 694 | 694 |
| 695 /** | 695 /** |
| 696 * @param {!WebInspector.StatusBarButton} button | 696 * @param {!WebInspector.StatusBarButton} button |
| (...skipping 706 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1403 | 1403 |
| 1404 WebInspector.SourcesPanelFactory.prototype = { | 1404 WebInspector.SourcesPanelFactory.prototype = { |
| 1405 /** | 1405 /** |
| 1406 * @return {!WebInspector.Panel} | 1406 * @return {!WebInspector.Panel} |
| 1407 */ | 1407 */ |
| 1408 createPanel: function() | 1408 createPanel: function() |
| 1409 { | 1409 { |
| 1410 return WebInspector.SourcesPanel.instance(); | 1410 return WebInspector.SourcesPanel.instance(); |
| 1411 } | 1411 } |
| 1412 } | 1412 } |
| OLD | NEW |