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

Side by Side Diff: Source/devtools/front_end/sources/SourcesPanel.js

Issue 338283004: DevTools: Use TargetsToolbar instead of ThreadToolbar (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Address vsevik's comments Created 6 years, 6 months 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 | Annotate | Revision Log
OLDNEW
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 24 matching lines...) Expand all
35 importScript("JavaScriptSourceFrame.js"); 35 importScript("JavaScriptSourceFrame.js");
36 importScript("CSSSourceFrame.js"); 36 importScript("CSSSourceFrame.js");
37 importScript("NavigatorView.js"); 37 importScript("NavigatorView.js");
38 importScript("RevisionHistoryView.js"); 38 importScript("RevisionHistoryView.js");
39 importScript("ScopeChainSidebarPane.js"); 39 importScript("ScopeChainSidebarPane.js");
40 importScript("SourcesNavigator.js"); 40 importScript("SourcesNavigator.js");
41 importScript("StyleSheetOutlineDialog.js"); 41 importScript("StyleSheetOutlineDialog.js");
42 importScript("TabbedEditorContainer.js"); 42 importScript("TabbedEditorContainer.js");
43 importScript("WatchExpressionsSidebarPane.js"); 43 importScript("WatchExpressionsSidebarPane.js");
44 importScript("WorkersSidebarPane.js"); 44 importScript("WorkersSidebarPane.js");
45 importScript("ThreadsToolbar.js"); 45 importScript("TargetsToolbar.js");
46 importScript("ScriptFormatterEditorAction.js"); 46 importScript("ScriptFormatterEditorAction.js");
47 importScript("InplaceFormatterEditorAction.js"); 47 importScript("InplaceFormatterEditorAction.js");
48 importScript("ScriptFormatter.js"); 48 importScript("ScriptFormatter.js");
49 importScript("SourcesView.js"); 49 importScript("SourcesView.js");
50 50
51 /** 51 /**
52 * @constructor 52 * @constructor
53 * @implements {WebInspector.ContextMenu.Provider} 53 * @implements {WebInspector.ContextMenu.Provider}
54 * @implements {WebInspector.TargetManager.Observer} 54 * @implements {WebInspector.TargetManager.Observer}
55 * @extends {WebInspector.Panel} 55 * @extends {WebInspector.Panel}
56 * @param {!WebInspector.Workspace=} workspaceForTest 56 * @param {!WebInspector.Workspace=} workspaceForTest
57 */ 57 */
58 WebInspector.SourcesPanel = function(workspaceForTest) 58 WebInspector.SourcesPanel = function(workspaceForTest)
59 { 59 {
60 WebInspector.Panel.call(this, "sources"); 60 WebInspector.Panel.call(this, "sources");
61 this.registerRequiredCSS("sourcesPanel.css"); 61 this.registerRequiredCSS("sourcesPanel.css");
62 this.registerRequiredCSS("suggestBox.css"); 62 this.registerRequiredCSS("suggestBox.css");
63 new WebInspector.UpgradeFileSystemDropTarget(this.element); 63 new WebInspector.UpgradeFileSystemDropTarget(this.element);
64 64
65 WebInspector.settings.showEditorInDrawer = WebInspector.settings.createSetti ng("showEditorInDrawer", true); 65 WebInspector.settings.showEditorInDrawer = WebInspector.settings.createSetti ng("showEditorInDrawer", true);
66 66
67 this._workspace = workspaceForTest || WebInspector.workspace; 67 this._workspace = workspaceForTest || WebInspector.workspace;
68 68
69 var helpSection = WebInspector.shortcutsScreen.section(WebInspector.UIString ("Sources Panel")); 69 var helpSection = WebInspector.shortcutsScreen.section(WebInspector.UIString ("Sources Panel"));
70 this.debugToolbar = this._createDebugToolbar(); 70 this.debugToolbar = this._createDebugToolbar();
71 this._debugToolbarDrawer = this._createDebugToolbarDrawer(); 71 this._debugToolbarDrawer = this._createDebugToolbarDrawer();
72 this.threadsToolbar = new WebInspector.ThreadsToolbar(); 72 this._targetsToolbar = new WebInspector.TargetsToolbar();
73 73
74 const initialDebugSidebarWidth = 225; 74 const initialDebugSidebarWidth = 225;
75 this._splitView = new WebInspector.SplitView(true, true, "sourcesPanelSplitV iewState", initialDebugSidebarWidth); 75 this._splitView = new WebInspector.SplitView(true, true, "sourcesPanelSplitV iewState", initialDebugSidebarWidth);
76 this._splitView.enableShowModeSaving(); 76 this._splitView.enableShowModeSaving();
77 this._splitView.show(this.element); 77 this._splitView.show(this.element);
78 78
79 // Create scripts navigator 79 // Create scripts navigator
80 const initialNavigatorWidth = 225; 80 const initialNavigatorWidth = 225;
81 this.editorView = new WebInspector.SplitView(true, false, "sourcesPanelNavig atorSplitViewState", initialNavigatorWidth); 81 this.editorView = new WebInspector.SplitView(true, false, "sourcesPanelNavig atorSplitViewState", initialNavigatorWidth);
82 this.editorView.enableShowModeSaving(); 82 this.editorView.enableShowModeSaving();
(...skipping 962 matching lines...) Expand 10 before | Expand all | Expand 10 after
1045 1045
1046 if (!vertically) 1046 if (!vertically)
1047 this._splitView.uninstallResizer(this._sourcesView.statusBarContaine rElement()); 1047 this._splitView.uninstallResizer(this._sourcesView.statusBarContaine rElement());
1048 else 1048 else
1049 this._splitView.installResizer(this._sourcesView.statusBarContainerE lement()); 1049 this._splitView.installResizer(this._sourcesView.statusBarContainerE lement());
1050 1050
1051 // Create vertical box with stack. 1051 // Create vertical box with stack.
1052 var vbox = new WebInspector.VBox(); 1052 var vbox = new WebInspector.VBox();
1053 vbox.element.appendChild(this._debugToolbarDrawer); 1053 vbox.element.appendChild(this._debugToolbarDrawer);
1054 vbox.element.appendChild(this.debugToolbar); 1054 vbox.element.appendChild(this.debugToolbar);
1055 vbox.element.appendChild(this.threadsToolbar.element); 1055 vbox.element.appendChild(this._targetsToolbar.element);
1056 vbox.setMinimumAndPreferredSizes(25, 25, WebInspector.SourcesPanel.minTo olbarWidth, 100); 1056 vbox.setMinimumAndPreferredSizes(25, 25, WebInspector.SourcesPanel.minTo olbarWidth, 100);
1057 var sidebarPaneStack = new WebInspector.SidebarPaneStack(); 1057 var sidebarPaneStack = new WebInspector.SidebarPaneStack();
1058 sidebarPaneStack.element.classList.add("flex-auto"); 1058 sidebarPaneStack.element.classList.add("flex-auto");
1059 sidebarPaneStack.show(vbox.element); 1059 sidebarPaneStack.show(vbox.element);
1060 1060
1061 if (!vertically) { 1061 if (!vertically) {
1062 // Populate the only stack. 1062 // Populate the only stack.
1063 for (var pane in this.sidebarPanes) 1063 for (var pane in this.sidebarPanes)
1064 sidebarPaneStack.addPane(this.sidebarPanes[pane]); 1064 sidebarPaneStack.addPane(this.sidebarPanes[pane]);
1065 this._extensionSidebarPanesContainer = sidebarPaneStack; 1065 this._extensionSidebarPanesContainer = sidebarPaneStack;
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after
1412 WebInspector.SourcesPanel.TogglePauseActionDelegate.prototype = { 1412 WebInspector.SourcesPanel.TogglePauseActionDelegate.prototype = {
1413 /** 1413 /**
1414 * @return {boolean} 1414 * @return {boolean}
1415 */ 1415 */
1416 handleAction: function() 1416 handleAction: function()
1417 { 1417 {
1418 /** @type {!WebInspector.SourcesPanel} */ (WebInspector.inspectorView.sh owPanel("sources")).togglePause(); 1418 /** @type {!WebInspector.SourcesPanel} */ (WebInspector.inspectorView.sh owPanel("sources")).togglePause();
1419 return true; 1419 return true;
1420 } 1420 }
1421 } 1421 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/sdk/WorkerTargetManager.js ('k') | Source/devtools/front_end/sources/TargetsToolbar.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698