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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/resources/ResourcesPanel.js

Issue 2412023002: DevTools: migrate InspectorView to tabbed view location. (Closed)
Patch Set: made layers panel closeable. Created 4 years, 2 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 /* 1 /*
2 * Copyright (C) 2007, 2008, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2007, 2008, 2010 Apple Inc. All rights reserved.
3 * Copyright (C) 2009 Joseph Pecoraro 3 * Copyright (C) 2009 Joseph Pecoraro
4 * Copyright (C) 2013 Samsung Electronics. All rights reserved. 4 * Copyright (C) 2013 Samsung Electronics. All rights reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 9 *
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
(...skipping 848 matching lines...) Expand 10 before | Expand all | Expand 10 after
859 /** 859 /**
860 * @override 860 * @override
861 * @param {!Object} resource 861 * @param {!Object} resource
862 * @return {!Promise} 862 * @return {!Promise}
863 */ 863 */
864 reveal: function(resource) 864 reveal: function(resource)
865 { 865 {
866 if (!(resource instanceof WebInspector.Resource)) 866 if (!(resource instanceof WebInspector.Resource))
867 return Promise.reject(new Error("Internal error: not a resource")); 867 return Promise.reject(new Error("Internal error: not a resource"));
868 var panel = WebInspector.ResourcesPanel._instance(); 868 var panel = WebInspector.ResourcesPanel._instance();
869 WebInspector.inspectorView.setCurrentPanel(panel); 869 return WebInspector.viewManager.showView("resources").then(panel.showRes ource.bind(panel, resource));
870 panel.showResource(resource);
871 return Promise.resolve();
872 } 870 }
873 } 871 }
874 872
875 /** 873 /**
876 * @constructor 874 * @constructor
877 * @extends {TreeElement} 875 * @extends {TreeElement}
878 * @param {!WebInspector.ResourcesPanel} storagePanel 876 * @param {!WebInspector.ResourcesPanel} storagePanel
879 * @param {string} title 877 * @param {string} title
880 * @param {?Array.<string>=} iconClasses 878 * @param {?Array.<string>=} iconClasses
881 * @param {boolean=} expandable 879 * @param {boolean=} expandable
(...skipping 1318 matching lines...) Expand 10 before | Expand all | Expand 10 after
2200 2198
2201 WebInspector.StorageCategoryView.prototype = { 2199 WebInspector.StorageCategoryView.prototype = {
2202 setText: function(text) 2200 setText: function(text)
2203 { 2201 {
2204 this._emptyWidget.text = text; 2202 this._emptyWidget.text = text;
2205 }, 2203 },
2206 2204
2207 __proto__: WebInspector.VBox.prototype 2205 __proto__: WebInspector.VBox.prototype
2208 } 2206 }
2209 2207
2210 WebInspector.ResourcesPanel.show = function()
2211 {
2212 WebInspector.inspectorView.setCurrentPanel(WebInspector.ResourcesPanel._inst ance());
2213 }
2214
2215 /** 2208 /**
2216 * @return {!WebInspector.ResourcesPanel} 2209 * @return {!WebInspector.ResourcesPanel}
2217 */ 2210 */
2218 WebInspector.ResourcesPanel._instance = function() 2211 WebInspector.ResourcesPanel._instance = function()
2219 { 2212 {
2220 return /** @type {!WebInspector.ResourcesPanel} */ (self.runtime.sharedInsta nce(WebInspector.ResourcesPanel)); 2213 return /** @type {!WebInspector.ResourcesPanel} */ (self.runtime.sharedInsta nce(WebInspector.ResourcesPanel));
2221 } 2214 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698