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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/security/SecurityPanel.js

Issue 2168323002: [DevTools] Explicitly require ResourceTreeModel (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: [DevTools] Explicitly require ResourceTreeModel Created 4 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 * @extends {WebInspector.PanelWithSidebar} 7 * @extends {WebInspector.PanelWithSidebar}
8 * @implements {WebInspector.TargetManager.Observer} 8 * @implements {WebInspector.TargetManager.Observer}
9 */ 9 */
10 WebInspector.SecurityPanel = function() 10 WebInspector.SecurityPanel = function()
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 * @override 241 * @override
242 * @param {!WebInspector.Target} target 242 * @param {!WebInspector.Target} target
243 */ 243 */
244 targetAdded: function(target) 244 targetAdded: function(target)
245 { 245 {
246 if (this._target) 246 if (this._target)
247 return; 247 return;
248 248
249 this._target = target; 249 this._target = target;
250 250
251 if (target.hasBrowserCapability()) { 251 var resourceTreeModel = WebInspector.ResourceTreeModel.fromTarget(this._ target);
252 target.resourceTreeModel.addEventListener(WebInspector.ResourceTreeM odel.EventTypes.MainFrameNavigated, this._onMainFrameNavigated, this); 252 if (resourceTreeModel) {
253 target.resourceTreeModel.addEventListener(WebInspector.ResourceTreeM odel.EventTypes.InterstitialShown, this._onInterstitialShown, this); 253 resourceTreeModel.addEventListener(WebInspector.ResourceTreeModel.Ev entTypes.MainFrameNavigated, this._onMainFrameNavigated, this);
254 target.resourceTreeModel.addEventListener(WebInspector.ResourceTreeM odel.EventTypes.InterstitialHidden, this._onInterstitialHidden, this); 254 resourceTreeModel.addEventListener(WebInspector.ResourceTreeModel.Ev entTypes.InterstitialShown, this._onInterstitialShown, this);
255 resourceTreeModel.addEventListener(WebInspector.ResourceTreeModel.Ev entTypes.InterstitialHidden, this._onInterstitialHidden, this);
255 } 256 }
256 257
257 var networkManager = WebInspector.NetworkManager.fromTarget(target); 258 var networkManager = WebInspector.NetworkManager.fromTarget(target);
258 networkManager.addEventListener(WebInspector.NetworkManager.EventTypes.R esponseReceived, this._onResponseReceived, this); 259 networkManager.addEventListener(WebInspector.NetworkManager.EventTypes.R esponseReceived, this._onResponseReceived, this);
259 networkManager.addEventListener(WebInspector.NetworkManager.EventTypes.R equestFinished, this._onRequestFinished, this); 260 networkManager.addEventListener(WebInspector.NetworkManager.EventTypes.R equestFinished, this._onRequestFinished, this);
260 261
261 var securityModel = WebInspector.SecurityModel.fromTarget(target); 262 var securityModel = WebInspector.SecurityModel.fromTarget(target);
262 securityModel.addEventListener(WebInspector.SecurityModel.EventTypes.Sec urityStateChanged, this._onSecurityStateChanged, this); 263 securityModel.addEventListener(WebInspector.SecurityModel.EventTypes.Sec urityStateChanged, this._onSecurityStateChanged, this);
263 }, 264 },
264 265
(...skipping 718 matching lines...) Expand 10 before | Expand all | Expand 10 after
983 row.createChild("div").textContent = key; 984 row.createChild("div").textContent = key;
984 985
985 var valueDiv = row.createChild("div"); 986 var valueDiv = row.createChild("div");
986 if (typeof value === "string") { 987 if (typeof value === "string") {
987 valueDiv.textContent = value; 988 valueDiv.textContent = value;
988 } else { 989 } else {
989 valueDiv.appendChild(value); 990 valueDiv.appendChild(value);
990 } 991 }
991 } 992 }
992 } 993 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698