| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2008, 2009 Anthony Ricaud <rik@webkit.org> | 3 * Copyright (C) 2008, 2009 Anthony Ricaud <rik@webkit.org> |
| 4 * Copyright (C) 2011 Google Inc. All rights reserved. | 4 * Copyright (C) 2011 Google Inc. 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 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 245 * @param {number} percentage | 245 * @param {number} percentage |
| 246 * @return {number} | 246 * @return {number} |
| 247 */ | 247 */ |
| 248 percentageToTime: function(percentage) | 248 percentageToTime: function(percentage) |
| 249 { | 249 { |
| 250 return percentage * this.boundarySpan() / 100 + this.minimumBoundary(); | 250 return percentage * this.boundarySpan() / 100 + this.minimumBoundary(); |
| 251 }, | 251 }, |
| 252 | 252 |
| 253 _boundaryChanged: function() | 253 _boundaryChanged: function() |
| 254 { | 254 { |
| 255 this._boundryChangedEventThrottler.schedule(this.dispatchEventToListener
s.bind(this, WebInspector.NetworkTimeCalculator.Events.BoundariesChanged)); | 255 this._boundryChangedEventThrottler.schedule(dispatchEvent.bind(this)); |
| 256 |
| 257 /** |
| 258 * @return {!Promise.<undefined>} |
| 259 * @this {WebInspector.NetworkTimeCalculator} |
| 260 */ |
| 261 function dispatchEvent() |
| 262 { |
| 263 this.dispatchEventToListeners(WebInspector.NetworkTimeCalculator.Eve
nts.BoundariesChanged); |
| 264 return Promise.resolve(); |
| 265 } |
| 256 }, | 266 }, |
| 257 | 267 |
| 258 /** | 268 /** |
| 259 * @param {number} eventTime | 269 * @param {number} eventTime |
| 260 */ | 270 */ |
| 261 updateBoundariesForEventTime: function(eventTime) | 271 updateBoundariesForEventTime: function(eventTime) |
| 262 { | 272 { |
| 263 if (eventTime === -1 || this.startAtZero) | 273 if (eventTime === -1 || this.startAtZero) |
| 264 return; | 274 return; |
| 265 | 275 |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 429 * @param {!WebInspector.NetworkRequest} request | 439 * @param {!WebInspector.NetworkRequest} request |
| 430 * @return {number} | 440 * @return {number} |
| 431 */ | 441 */ |
| 432 _upperBound: function(request) | 442 _upperBound: function(request) |
| 433 { | 443 { |
| 434 return request.duration; | 444 return request.duration; |
| 435 }, | 445 }, |
| 436 | 446 |
| 437 __proto__: WebInspector.NetworkTimeCalculator.prototype | 447 __proto__: WebInspector.NetworkTimeCalculator.prototype |
| 438 } | 448 } |
| OLD | NEW |