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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/network/RequestPreviewView.js

Issue 2157713002: DevTools: introduce View: a named widget with the toolbar. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: lcean Created 4 years, 5 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) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * 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 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 this.innerView = this._previewView; 61 this.innerView = this._previewView;
62 } 62 }
63 63
64 /** 64 /**
65 * @param {!WebInspector.Widget} view 65 * @param {!WebInspector.Widget} view
66 * @this {WebInspector.RequestPreviewView} 66 * @this {WebInspector.RequestPreviewView}
67 */ 67 */
68 function handlePreviewView(view) { 68 function handlePreviewView(view) {
69 this._previewView = view; 69 this._previewView = view;
70 this._previewView.show(this.element); 70 this._previewView.show(this.element);
71 if (this._previewView instanceof WebInspector.VBoxWithToolbarItems) { 71 if (this._previewView instanceof WebInspector.View) {
72 var toolbar = new WebInspector.Toolbar("network-item-preview-too lbar", this.element); 72 var toolbar = new WebInspector.Toolbar("network-item-preview-too lbar", this.element);
73 for (var item of /** @type {!WebInspector.VBoxWithToolbarItems} */ (this._previewView).toolbarItems()) 73 for (var item of /** @type {!WebInspector.View} */ (this._previe wView).toolbarItems())
74 toolbar.appendToolbarItem(item); 74 toolbar.appendToolbarItem(item);
75 } 75 }
76 this.innerView = this._previewView; 76 this.innerView = this._previewView;
77 this._previewViewHandledForTest(this._previewView); 77 this._previewViewHandledForTest(this._previewView);
78 } 78 }
79 }, 79 },
80 80
81 /** 81 /**
82 * @param {!WebInspector.Widget} view 82 * @param {!WebInspector.Widget} view
83 */ 83 */
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 187
188 if (this.request.resourceType() === WebInspector.resourceTypes.Other ) 188 if (this.request.resourceType() === WebInspector.resourceTypes.Other )
189 return this._createEmptyWidget(); 189 return this._createEmptyWidget();
190 190
191 return WebInspector.RequestView.nonSourceViewForRequest(this.request ); 191 return WebInspector.RequestView.nonSourceViewForRequest(this.request );
192 } 192 }
193 }, 193 },
194 194
195 __proto__: WebInspector.RequestContentView.prototype 195 __proto__: WebInspector.RequestContentView.prototype
196 } 196 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698