| 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 15 matching lines...) Expand all Loading... |
| 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 29 */ | 29 */ |
| 30 | 30 |
| 31 #ifndef PerformanceNavigation_h | 31 #ifndef PerformanceNavigation_h |
| 32 #define PerformanceNavigation_h | 32 #define PerformanceNavigation_h |
| 33 | 33 |
| 34 #include "bindings/core/v8/ScriptWrappable.h" | 34 #include "bindings/core/v8/ScriptWrappable.h" |
| 35 #include "core/CoreExport.h" | 35 #include "core/CoreExport.h" |
| 36 #include "core/frame/DOMWindowProperty.h" | 36 #include "core/dom/ContextLifecycleObserver.h" |
| 37 #include "platform/heap/Handle.h" | 37 #include "platform/heap/Handle.h" |
| 38 | 38 |
| 39 namespace blink { | 39 namespace blink { |
| 40 | 40 |
| 41 class LocalFrame; | 41 class LocalFrame; |
| 42 class ScriptState; | 42 class ScriptState; |
| 43 class ScriptValue; | 43 class ScriptValue; |
| 44 | 44 |
| 45 // Legacy support for NT1(https://www.w3.org/TR/navigation-timing/). | 45 // Legacy support for NT1(https://www.w3.org/TR/navigation-timing/). |
| 46 class CORE_EXPORT PerformanceNavigation final | 46 class CORE_EXPORT PerformanceNavigation final |
| 47 : public GarbageCollected<PerformanceNavigation>, | 47 : public GarbageCollected<PerformanceNavigation>, |
| 48 public ScriptWrappable, | 48 public ScriptWrappable, |
| 49 public DOMWindowProperty { | 49 public ContextClient { |
| 50 DEFINE_WRAPPERTYPEINFO(); | 50 DEFINE_WRAPPERTYPEINFO(); |
| 51 USING_GARBAGE_COLLECTED_MIXIN(PerformanceNavigation); | 51 USING_GARBAGE_COLLECTED_MIXIN(PerformanceNavigation); |
| 52 | 52 |
| 53 public: | 53 public: |
| 54 static PerformanceNavigation* create(LocalFrame* frame) { | 54 static PerformanceNavigation* create(LocalFrame* frame) { |
| 55 return new PerformanceNavigation(frame); | 55 return new PerformanceNavigation(frame); |
| 56 } | 56 } |
| 57 | 57 |
| 58 enum PerformanceNavigationType { | 58 enum PerformanceNavigationType { |
| 59 kTypeNavigate, | 59 kTypeNavigate, |
| 60 kTypeReload, | 60 kTypeReload, |
| 61 kTypeBackForward, | 61 kTypeBackForward, |
| 62 kTypeReserved = 255 | 62 kTypeReserved = 255 |
| 63 }; | 63 }; |
| 64 | 64 |
| 65 unsigned short type() const; | 65 unsigned short type() const; |
| 66 unsigned short redirectCount() const; | 66 unsigned short redirectCount() const; |
| 67 | 67 |
| 68 ScriptValue toJSONForBinding(ScriptState*) const; | 68 ScriptValue toJSONForBinding(ScriptState*) const; |
| 69 | 69 |
| 70 DECLARE_VIRTUAL_TRACE(); | 70 DECLARE_VIRTUAL_TRACE(); |
| 71 | 71 |
| 72 private: | 72 private: |
| 73 explicit PerformanceNavigation(LocalFrame*); | 73 explicit PerformanceNavigation(LocalFrame*); |
| 74 }; | 74 }; |
| 75 | 75 |
| 76 } // namespace blink | 76 } // namespace blink |
| 77 | 77 |
| 78 #endif // PerformanceNavigation_h | 78 #endif // PerformanceNavigation_h |
| OLD | NEW |