| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 DocumentLoadTiming* timing = documentLoadTiming(); | 89 DocumentLoadTiming* timing = documentLoadTiming(); |
| 90 if (!timing) | 90 if (!timing) |
| 91 return 0; | 91 return 0; |
| 92 | 92 |
| 93 if (timing->hasCrossOriginRedirect() || !timing->hasSameOriginAsPreviousDocu
ment()) | 93 if (timing->hasCrossOriginRedirect() || !timing->hasSameOriginAsPreviousDocu
ment()) |
| 94 return 0; | 94 return 0; |
| 95 | 95 |
| 96 return monotonicTimeToIntegerMilliseconds(timing->unloadEventEnd()); | 96 return monotonicTimeToIntegerMilliseconds(timing->unloadEventEnd()); |
| 97 } | 97 } |
| 98 | 98 |
| 99 unsigned long long PerformanceTiming::workerStart() const |
| 100 { |
| 101 ResourceLoadTiming* timing = resourceLoadTiming(); |
| 102 if (!timing) |
| 103 return 0; |
| 104 |
| 105 return monotonicTimeToIntegerMilliseconds(timing->workerStart()); |
| 106 } |
| 107 |
| 99 unsigned long long PerformanceTiming::redirectStart() const | 108 unsigned long long PerformanceTiming::redirectStart() const |
| 100 { | 109 { |
| 101 DocumentLoadTiming* timing = documentLoadTiming(); | 110 DocumentLoadTiming* timing = documentLoadTiming(); |
| 102 if (!timing) | 111 if (!timing) |
| 103 return 0; | 112 return 0; |
| 104 | 113 |
| 105 if (timing->hasCrossOriginRedirect()) | 114 if (timing->hasCrossOriginRedirect()) |
| 106 return 0; | 115 return 0; |
| 107 | 116 |
| 108 return monotonicTimeToIntegerMilliseconds(timing->redirectStart()); | 117 return monotonicTimeToIntegerMilliseconds(timing->redirectStart()); |
| (...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 504 | 513 |
| 505 return timing->pseudoWallTimeToMonotonicTime(toDoubleSeconds(integerMillisec
onds)); | 514 return timing->pseudoWallTimeToMonotonicTime(toDoubleSeconds(integerMillisec
onds)); |
| 506 } | 515 } |
| 507 | 516 |
| 508 DEFINE_TRACE(PerformanceTiming) | 517 DEFINE_TRACE(PerformanceTiming) |
| 509 { | 518 { |
| 510 DOMWindowProperty::trace(visitor); | 519 DOMWindowProperty::trace(visitor); |
| 511 } | 520 } |
| 512 | 521 |
| 513 } // namespace blink | 522 } // namespace blink |
| OLD | NEW |