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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/ui/View.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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 * @interface 6 * @interface
7 */ 7 */
8 WebInspector.View = function() 8 WebInspector.View = function()
9 { 9 {
10 } 10 }
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 * @param {string} viewId 318 * @param {string} viewId
319 * @return {?WebInspector.View} 319 * @return {?WebInspector.View}
320 */ 320 */
321 view: function(viewId) 321 view: function(viewId)
322 { 322 {
323 return this._views.get(viewId); 323 return this._views.get(viewId);
324 }, 324 },
325 325
326 /** 326 /**
327 * @param {string} viewId 327 * @param {string} viewId
328 * @param {boolean=} skipReveal
328 * @return {!Promise} 329 * @return {!Promise}
329 */ 330 */
330 showView: function(viewId) 331 showView: function(viewId, skipReveal)
331 { 332 {
332 var view = this._views.get(viewId); 333 var view = this._views.get(viewId);
333 if (!view) { 334 if (!view) {
334 console.error("Could not find view for id: '" + viewId + "' " + new Error().stack); 335 console.error("Could not find view for id: '" + viewId + "' " + new Error().stack);
335 return Promise.resolve(); 336 return Promise.resolve();
336 } 337 }
337 338
338 var locationName = this._locationNameByViewId.get(viewId); 339 var locationName = this._locationNameByViewId.get(viewId);
339 if (locationName === "drawer-view") 340 if (locationName === "drawer-view")
340 WebInspector.userMetrics.drawerShown(viewId); 341 WebInspector.userMetrics.drawerShown(viewId);
341 342
342 var location = view[WebInspector.ViewManager._Location.symbol]; 343 var location = view[WebInspector.ViewManager._Location.symbol];
343 if (location) { 344 if (location) {
344 location._reveal(); 345 if (!skipReveal)
346 location._reveal();
345 return location.showView(view); 347 return location.showView(view);
346 } 348 }
347 349
348 return this._resolveLocation(locationName).then(location => { 350 return this._resolveLocation(locationName).then(location => {
349 if (!location) 351 if (!location)
350 throw new Error("Could not resolve location for view: " + viewId ); 352 throw new Error("Could not resolve location for view: " + viewId );
351 location._reveal(); 353 location._reveal();
352 return location.showView(view); 354 return location.showView(view);
353 }); 355 });
354 }, 356 },
(...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after
814 this.appendView(view); 816 this.appendView(view);
815 }, 817 },
816 818
817 __proto__: WebInspector.ViewManager._Location.prototype 819 __proto__: WebInspector.ViewManager._Location.prototype
818 } 820 }
819 821
820 /** 822 /**
821 * @type {!WebInspector.ViewManager} 823 * @type {!WebInspector.ViewManager}
822 */ 824 */
823 WebInspector.viewManager; 825 WebInspector.viewManager;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698