| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google Inc. All rights reserved. |
| 3 * Copyright (C) 2012 Intel Inc. All rights reserved. | 3 * Copyright (C) 2012 Intel Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
| 7 * met: | 7 * met: |
| 8 * | 8 * |
| 9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 #include "core/CoreExport.h" | 35 #include "core/CoreExport.h" |
| 36 #include "core/frame/DOMWindowProperty.h" | 36 #include "core/frame/DOMWindowProperty.h" |
| 37 #include "core/timing/MemoryInfo.h" | 37 #include "core/timing/MemoryInfo.h" |
| 38 #include "core/timing/PerformanceBase.h" | 38 #include "core/timing/PerformanceBase.h" |
| 39 #include "core/timing/PerformanceNavigation.h" | 39 #include "core/timing/PerformanceNavigation.h" |
| 40 #include "core/timing/PerformanceTiming.h" | 40 #include "core/timing/PerformanceTiming.h" |
| 41 | 41 |
| 42 namespace blink { | 42 namespace blink { |
| 43 | 43 |
| 44 class InspectorWebPerfAgent; | 44 class InspectorWebPerfAgent; |
| 45 class ScriptState; |
| 46 class ScriptValue; |
| 45 | 47 |
| 46 class CORE_EXPORT Performance final : public PerformanceBase, | 48 class CORE_EXPORT Performance final : public PerformanceBase, |
| 47 public DOMWindowProperty { | 49 public DOMWindowProperty { |
| 48 DEFINE_WRAPPERTYPEINFO(); | 50 DEFINE_WRAPPERTYPEINFO(); |
| 49 USING_GARBAGE_COLLECTED_MIXIN(Performance); | 51 USING_GARBAGE_COLLECTED_MIXIN(Performance); |
| 50 friend class PerformanceTest; | 52 friend class PerformanceTest; |
| 51 | 53 |
| 52 public: | 54 public: |
| 53 static Performance* create(LocalFrame* frame) { | 55 static Performance* create(LocalFrame* frame) { |
| 54 return new Performance(frame); | 56 return new Performance(frame); |
| 55 } | 57 } |
| 56 ~Performance() override; | 58 ~Performance() override; |
| 57 | 59 |
| 58 ExecutionContext* getExecutionContext() const override; | 60 ExecutionContext* getExecutionContext() const override; |
| 59 | 61 |
| 60 MemoryInfo* memory(); | 62 MemoryInfo* memory(); |
| 61 PerformanceNavigation* navigation() const; | 63 PerformanceNavigation* navigation() const; |
| 62 PerformanceTiming* timing() const override; | 64 PerformanceTiming* timing() const override; |
| 63 | 65 |
| 64 void updateLongTaskInstrumentation() override; | 66 void updateLongTaskInstrumentation() override; |
| 65 | 67 |
| 68 ScriptValue toJSONForBinding(ScriptState*) const; |
| 69 |
| 66 DECLARE_VIRTUAL_TRACE(); | 70 DECLARE_VIRTUAL_TRACE(); |
| 67 | 71 |
| 68 private: | 72 private: |
| 69 explicit Performance(LocalFrame*); | 73 explicit Performance(LocalFrame*); |
| 70 | 74 |
| 71 mutable Member<PerformanceNavigation> m_navigation; | 75 mutable Member<PerformanceNavigation> m_navigation; |
| 72 mutable Member<PerformanceTiming> m_timing; | 76 mutable Member<PerformanceTiming> m_timing; |
| 73 mutable Member<InspectorWebPerfAgent> m_longTaskInspectorAgent; | 77 mutable Member<InspectorWebPerfAgent> m_longTaskInspectorAgent; |
| 74 }; | 78 }; |
| 75 | 79 |
| 76 } // namespace blink | 80 } // namespace blink |
| 77 | 81 |
| 78 #endif // Performance_h | 82 #endif // Performance_h |
| OLD | NEW |