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

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

Issue 422023002: DevTools: NOOP if outline dialog is not available for the content type (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: address comments Created 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | 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 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * @constructor 6 * @constructor
7 * @implements {WebInspector.TabbedEditorContainerDelegate} 7 * @implements {WebInspector.TabbedEditorContainerDelegate}
8 * @implements {WebInspector.Searchable} 8 * @implements {WebInspector.Searchable}
9 * @implements {WebInspector.Replaceable} 9 * @implements {WebInspector.Replaceable}
10 * @extends {WebInspector.VBox} 10 * @extends {WebInspector.VBox}
(...skipping 593 matching lines...) Expand 10 before | Expand all | Expand 10 after
604 return false; 604 return false;
605 605
606 switch (uiSourceCode.contentType()) { 606 switch (uiSourceCode.contentType()) {
607 case WebInspector.resourceTypes.Document: 607 case WebInspector.resourceTypes.Document:
608 case WebInspector.resourceTypes.Script: 608 case WebInspector.resourceTypes.Script:
609 WebInspector.JavaScriptOutlineDialog.show(this, uiSourceCode, this.s howSourceLocation.bind(this, uiSourceCode)); 609 WebInspector.JavaScriptOutlineDialog.show(this, uiSourceCode, this.s howSourceLocation.bind(this, uiSourceCode));
610 return true; 610 return true;
611 case WebInspector.resourceTypes.Stylesheet: 611 case WebInspector.resourceTypes.Stylesheet:
612 WebInspector.StyleSheetOutlineDialog.show(this, uiSourceCode, this.s howSourceLocation.bind(this, uiSourceCode)); 612 WebInspector.StyleSheetOutlineDialog.show(this, uiSourceCode, this.s howSourceLocation.bind(this, uiSourceCode));
613 return true; 613 return true;
614 default:
615 // We don't want default browser shortcut to be executed, so pretend to handle this event.
616 return true;
614 } 617 }
615 return false;
616 }, 618 },
617 619
618 /** 620 /**
619 * @param {string=} query 621 * @param {string=} query
620 */ 622 */
621 showOpenResourceDialog: function(query) 623 showOpenResourceDialog: function(query)
622 { 624 {
623 var uiSourceCodes = this._editorContainer.historyUISourceCodes(); 625 var uiSourceCodes = this._editorContainer.historyUISourceCodes();
624 /** @type {!Map.<!WebInspector.UISourceCode, number>} */ 626 /** @type {!Map.<!WebInspector.UISourceCode, number>} */
625 var defaultScores = new Map(); 627 var defaultScores = new Map();
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
770 var currentUISourceCode = sourcesView.currentUISourceCode(); 772 var currentUISourceCode = sourcesView.currentUISourceCode();
771 if (!currentUISourceCode) 773 if (!currentUISourceCode)
772 return true; 774 return true;
773 var nextUISourceCode = WebInspector.SourcesView.SwitchFileActionDelegate ._nextFile(currentUISourceCode); 775 var nextUISourceCode = WebInspector.SourcesView.SwitchFileActionDelegate ._nextFile(currentUISourceCode);
774 if (!nextUISourceCode) 776 if (!nextUISourceCode)
775 return true; 777 return true;
776 sourcesView.showSourceLocation(nextUISourceCode); 778 sourcesView.showSourceLocation(nextUISourceCode);
777 return true; 779 return true;
778 } 780 }
779 } 781 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698