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 18 matching lines...) Expand all Loading... |
29 */ | 29 */ |
30 | 30 |
31 #include "core/timing/PerformanceNavigation.h" | 31 #include "core/timing/PerformanceNavigation.h" |
32 | 32 |
33 #include "bindings/core/v8/ScriptValue.h" | 33 #include "bindings/core/v8/ScriptValue.h" |
34 #include "bindings/core/v8/V8ObjectBuilder.h" | 34 #include "bindings/core/v8/V8ObjectBuilder.h" |
35 #include "core/frame/LocalFrame.h" | 35 #include "core/frame/LocalFrame.h" |
36 #include "core/loader/DocumentLoader.h" | 36 #include "core/loader/DocumentLoader.h" |
37 #include "core/loader/FrameLoaderTypes.h" | 37 #include "core/loader/FrameLoaderTypes.h" |
38 | 38 |
| 39 // Legacy support for NT1(https://www.w3.org/TR/navigation-timing/). |
39 namespace blink { | 40 namespace blink { |
40 | 41 |
41 PerformanceNavigation::PerformanceNavigation(LocalFrame* frame) | 42 PerformanceNavigation::PerformanceNavigation(LocalFrame* frame) |
42 : DOMWindowProperty(frame) {} | 43 : DOMWindowProperty(frame) {} |
43 | 44 |
44 unsigned short PerformanceNavigation::type() const { | 45 unsigned short PerformanceNavigation::type() const { |
45 if (!frame()) | 46 if (!frame()) |
46 return kTypeNavigate; | 47 return kTypeNavigate; |
47 | 48 |
48 DocumentLoader* documentLoader = frame()->loader().documentLoader(); | 49 DocumentLoader* documentLoader = frame()->loader().documentLoader(); |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 result.addNumber("type", type()); | 81 result.addNumber("type", type()); |
81 result.addNumber("redirectCount", redirectCount()); | 82 result.addNumber("redirectCount", redirectCount()); |
82 return result.scriptValue(); | 83 return result.scriptValue(); |
83 } | 84 } |
84 | 85 |
85 DEFINE_TRACE(PerformanceNavigation) { | 86 DEFINE_TRACE(PerformanceNavigation) { |
86 DOMWindowProperty::trace(visitor); | 87 DOMWindowProperty::trace(visitor); |
87 } | 88 } |
88 | 89 |
89 } // namespace blink | 90 } // namespace blink |
OLD | NEW |