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

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

Issue 2224893004: DevTools: focus editor when SourcesPanel is shown (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nit Created 4 years, 4 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
« no previous file with comments | « third_party/WebKit/LayoutTests/inspector/sources/sources-panel-focus-editor-on-select-expected.txt ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 WebInspector.targetManager.observeTargets(this); 122 WebInspector.targetManager.observeTargets(this);
123 } 123 }
124 124
125 WebInspector.SourcesPanel._lastModificationTimeout = 200; 125 WebInspector.SourcesPanel._lastModificationTimeout = 200;
126 126
127 WebInspector.SourcesPanel.minToolbarWidth = 215; 127 WebInspector.SourcesPanel.minToolbarWidth = 215;
128 128
129 WebInspector.SourcesPanel.prototype = { 129 WebInspector.SourcesPanel.prototype = {
130 /** 130 /**
131 * @override 131 * @override
132 */
133 focus: function()
134 {
135 this._sourcesView.focus();
136 },
137
138 /**
139 * @override
132 * @param {!WebInspector.Target} target 140 * @param {!WebInspector.Target} target
133 */ 141 */
134 targetAdded: function(target) 142 targetAdded: function(target)
135 { 143 {
136 var hasThreads = WebInspector.targetManager.targets(WebInspector.Target. Capability.JS).length > 1; 144 var hasThreads = WebInspector.targetManager.targets(WebInspector.Target. Capability.JS).length > 1;
137 if (hasThreads && !this.sidebarPanes.threads) { 145 if (hasThreads && !this.sidebarPanes.threads) {
138 this.sidebarPanes.threads = new WebInspector.ThreadsSidebarPane(); 146 this.sidebarPanes.threads = new WebInspector.ThreadsSidebarPane();
139 if (this._sidebarPaneStack) { 147 if (this._sidebarPaneStack) {
140 this._sidebarPaneStack.showView(this.sidebarPanes.threads, this. _splitWidget.isVertical() ? this.sidebarPanes.watchExpressions : this.sidebarPan es.callstack); 148 this._sidebarPaneStack.showView(this.sidebarPanes.threads, this. _splitWidget.isVertical() ? this.sidebarPanes.watchExpressions : this.sidebarPan es.callstack);
141 } 149 }
(...skipping 1324 matching lines...) Expand 10 before | Expand all | Expand 10 after
1466 __proto__: WebInspector.VBox.prototype 1474 __proto__: WebInspector.VBox.prototype
1467 } 1475 }
1468 1476
1469 /** 1477 /**
1470 * @return {boolean} 1478 * @return {boolean}
1471 */ 1479 */
1472 WebInspector.SourcesPanel.WrapperView.isShowing = function() 1480 WebInspector.SourcesPanel.WrapperView.isShowing = function()
1473 { 1481 {
1474 return !!WebInspector.SourcesPanel.WrapperView._instance && WebInspector.Sou rcesPanel.WrapperView._instance.isShowing(); 1482 return !!WebInspector.SourcesPanel.WrapperView._instance && WebInspector.Sou rcesPanel.WrapperView._instance.isShowing();
1475 } 1483 }
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/inspector/sources/sources-panel-focus-editor-on-select-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698