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

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

Issue 2254683003: DevTools: setting to auto-reveal in navigator (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Dont open navigator at all un Created 4 years, 3 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 | « no previous file | third_party/WebKit/Source/devtools/front_end/sources/module.json » ('j') | 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 337 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 * @param {!WebInspector.UILocation} uiLocation 348 * @param {!WebInspector.UILocation} uiLocation
349 * @param {boolean=} omitFocus 349 * @param {boolean=} omitFocus
350 */ 350 */
351 showUILocation: function(uiLocation, omitFocus) 351 showUILocation: function(uiLocation, omitFocus)
352 { 352 {
353 this.showUISourceCode(uiLocation.uiSourceCode, uiLocation.lineNumber, ui Location.columnNumber, omitFocus); 353 this.showUISourceCode(uiLocation.uiSourceCode, uiLocation.lineNumber, ui Location.columnNumber, omitFocus);
354 }, 354 },
355 355
356 /** 356 /**
357 * @param {!WebInspector.UISourceCode} uiSourceCode 357 * @param {!WebInspector.UISourceCode} uiSourceCode
358 * @param {boolean=} skipReveal
358 */ 359 */
359 _revealInNavigator: function(uiSourceCode) 360 _revealInNavigator: function(uiSourceCode, skipReveal)
lushnikov 2016/08/26 22:31:09 this seems to be never used.
luoe 2016/08/26 23:14:28 Yeah, I messed up the if statement on #376
360 { 361 {
361 var extensions = self.runtime.extensions(WebInspector.NavigatorView); 362 var extensions = self.runtime.extensions(WebInspector.NavigatorView);
362 Promise.all(extensions.map(extension => extension.instance())).then(filt erNavigators); 363 Promise.all(extensions.map(extension => extension.instance())).then(filt erNavigators.bind(this));
363 364
364 /** 365 /**
366 * @this {WebInspector.SourcesPanel}
365 * @param {!Array.<!Object>} objects 367 * @param {!Array.<!Object>} objects
366 */ 368 */
367 function filterNavigators(objects) 369 function filterNavigators(objects)
368 { 370 {
369 for (var i = 0; i < objects.length; ++i) { 371 for (var i = 0; i < objects.length; ++i) {
370 var navigatorView = /** @type {!WebInspector.NavigatorView} */ ( objects[i]); 372 var navigatorView = /** @type {!WebInspector.NavigatorView} */ ( objects[i]);
373 var viewId = extensions[i].descriptor()["viewId"];
371 if (navigatorView.accept(uiSourceCode)) { 374 if (navigatorView.accept(uiSourceCode)) {
372 navigatorView.revealUISourceCode(uiSourceCode, true); 375 navigatorView.revealUISourceCode(uiSourceCode, true);
373 WebInspector.viewManager.showView(extensions[i].descriptor() ["viewId"]); 376 if (this.editorView.mainWidget())
lushnikov 2016/08/26 22:31:09 isn't it the same as always calling WebInspector.v
pfeldman 2016/08/26 22:36:27 You should not do WebInspector.viewManager.showVie
luoe 2016/08/26 23:14:28 Right, the condition should say if (skipReveal) {.
luoe 2016/08/26 23:14:28 Sorry, this condition should have been skipReveal,
377 this._navigatorTabbedLocation.tabbedPane().selectTab(vie wId);
378 else
379 WebInspector.viewManager.showView(viewId);
374 } 380 }
375 } 381 }
376 } 382 }
377 }, 383 },
378 384
379 /** 385 /**
380 * @param {!WebInspector.ContextMenu} contextMenu 386 * @param {!WebInspector.ContextMenu} contextMenu
381 */ 387 */
382 _populateNavigatorMenu: function(contextMenu) 388 _populateNavigatorMenu: function(contextMenu)
383 { 389 {
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
520 return true; 526 return true;
521 }, 527 },
522 528
523 /** 529 /**
524 * @param {!WebInspector.Event} event 530 * @param {!WebInspector.Event} event
525 */ 531 */
526 _editorSelected: function(event) 532 _editorSelected: function(event)
527 { 533 {
528 var uiSourceCode = /** @type {!WebInspector.UISourceCode} */ (event.data ); 534 var uiSourceCode = /** @type {!WebInspector.UISourceCode} */ (event.data );
529 this._editorChanged(uiSourceCode); 535 this._editorChanged(uiSourceCode);
536 if (this.editorView.mainWidget() && WebInspector.moduleSetting("autoReve alInNavigator").get())
537 this._revealInNavigator(uiSourceCode, true);
530 }, 538 },
531 539
532 /** 540 /**
533 * @param {!WebInspector.Event} event 541 * @param {!WebInspector.Event} event
534 */ 542 */
535 _editorClosed: function(event) 543 _editorClosed: function(event)
536 { 544 {
537 var wasSelected = /** @type {boolean} */ (event.data.wasSelected); 545 var wasSelected = /** @type {boolean} */ (event.data.wasSelected);
538 if (wasSelected) 546 if (wasSelected)
539 this._editorChanged(null); 547 this._editorChanged(null);
(...skipping 827 matching lines...) Expand 10 before | Expand all | Expand 10 after
1367 __proto__: WebInspector.VBox.prototype 1375 __proto__: WebInspector.VBox.prototype
1368 } 1376 }
1369 1377
1370 /** 1378 /**
1371 * @return {boolean} 1379 * @return {boolean}
1372 */ 1380 */
1373 WebInspector.SourcesPanel.WrapperView.isShowing = function() 1381 WebInspector.SourcesPanel.WrapperView.isShowing = function()
1374 { 1382 {
1375 return !!WebInspector.SourcesPanel.WrapperView._instance && WebInspector.Sou rcesPanel.WrapperView._instance.isShowing(); 1383 return !!WebInspector.SourcesPanel.WrapperView._instance && WebInspector.Sou rcesPanel.WrapperView._instance.isShowing();
1376 } 1384 }
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/sources/module.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698