| OLD | NEW |
| 1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 * @unrestricted | 5 * @unrestricted |
| 6 */ | 6 */ |
| 7 Network.BlockedURLsPane = class extends UI.VBox { | 7 Network.BlockedURLsPane = class extends UI.VBox { |
| 8 constructor() { | 8 constructor() { |
| 9 super(true); | 9 super(true); |
| 10 this.registerRequiredCSS('network/blockedURLsPane.css'); | 10 this.registerRequiredCSS('network/blockedURLsPane.css'); |
| (...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 250 reset() { | 250 reset() { |
| 251 this._blockedCountForUrl.clear(); | 251 this._blockedCountForUrl.clear(); |
| 252 } | 252 } |
| 253 | 253 |
| 254 /** | 254 /** |
| 255 * @param {!Common.Event} event | 255 * @param {!Common.Event} event |
| 256 */ | 256 */ |
| 257 _onRequestFinished(event) { | 257 _onRequestFinished(event) { |
| 258 var request = /** @type {!SDK.NetworkRequest} */ (event.data); | 258 var request = /** @type {!SDK.NetworkRequest} */ (event.data); |
| 259 if (request.wasBlocked()) { | 259 if (request.wasBlocked()) { |
| 260 var count = this._blockedCountForUrl.get(request.url) || 0; | 260 var count = this._blockedCountForUrl.get(request.url()) || 0; |
| 261 this._blockedCountForUrl.set(request.url, count + 1); | 261 this._blockedCountForUrl.set(request.url(), count + 1); |
| 262 this._updateThrottler.schedule(this._update.bind(this)); | 262 this._updateThrottler.schedule(this._update.bind(this)); |
| 263 } | 263 } |
| 264 } | 264 } |
| 265 }; | 265 }; |
| 266 | 266 |
| 267 /** @type {?Network.BlockedURLsPane} */ | 267 /** @type {?Network.BlockedURLsPane} */ |
| 268 Network.BlockedURLsPane._instance = null; | 268 Network.BlockedURLsPane._instance = null; |
| 269 | 269 |
| 270 | 270 |
| 271 /** | 271 /** |
| 272 * @implements {UI.ActionDelegate} | 272 * @implements {UI.ActionDelegate} |
| 273 * @unrestricted | 273 * @unrestricted |
| 274 */ | 274 */ |
| 275 Network.BlockedURLsPane.ActionDelegate = class { | 275 Network.BlockedURLsPane.ActionDelegate = class { |
| 276 /** | 276 /** |
| 277 * @override | 277 * @override |
| 278 * @param {!UI.Context} context | 278 * @param {!UI.Context} context |
| 279 * @param {string} actionId | 279 * @param {string} actionId |
| 280 * @return {boolean} | 280 * @return {boolean} |
| 281 */ | 281 */ |
| 282 handleAction(context, actionId) { | 282 handleAction(context, actionId) { |
| 283 UI.viewManager.showView('network.blocked-urls'); | 283 UI.viewManager.showView('network.blocked-urls'); |
| 284 return true; | 284 return true; |
| 285 } | 285 } |
| 286 }; | 286 }; |
| OLD | NEW |