| 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 26 matching lines...) Expand all Loading... |
| 37 #include "core/frame/PerformanceMonitor.h" | 37 #include "core/frame/PerformanceMonitor.h" |
| 38 #include "core/timing/MemoryInfo.h" | 38 #include "core/timing/MemoryInfo.h" |
| 39 #include "core/timing/PerformanceBase.h" | 39 #include "core/timing/PerformanceBase.h" |
| 40 #include "core/timing/PerformanceNavigation.h" | 40 #include "core/timing/PerformanceNavigation.h" |
| 41 #include "core/timing/PerformanceTiming.h" | 41 #include "core/timing/PerformanceTiming.h" |
| 42 | 42 |
| 43 namespace blink { | 43 namespace blink { |
| 44 | 44 |
| 45 class ScriptState; | 45 class ScriptState; |
| 46 class ScriptValue; | 46 class ScriptValue; |
| 47 class ResourceTimingInfo; |
| 47 | 48 |
| 48 class CORE_EXPORT Performance final : public PerformanceBase, | 49 class CORE_EXPORT Performance final : public PerformanceBase, |
| 49 public ContextLifecycleObserver, | 50 public ContextLifecycleObserver, |
| 50 public PerformanceMonitor::Client { | 51 public PerformanceMonitor::Client { |
| 51 DEFINE_WRAPPERTYPEINFO(); | 52 DEFINE_WRAPPERTYPEINFO(); |
| 52 USING_GARBAGE_COLLECTED_MIXIN(Performance); | 53 USING_GARBAGE_COLLECTED_MIXIN(Performance); |
| 53 friend class PerformanceTest; | 54 friend class PerformanceTest; |
| 54 | 55 |
| 55 public: | 56 public: |
| 56 static Performance* create(LocalFrame* frame) { | 57 static Performance* create(LocalFrame* frame) { |
| (...skipping 12 matching lines...) Expand all Loading... |
| 69 ScriptValue toJSONForBinding(ScriptState*) const; | 70 ScriptValue toJSONForBinding(ScriptState*) const; |
| 70 | 71 |
| 71 DECLARE_VIRTUAL_TRACE(); | 72 DECLARE_VIRTUAL_TRACE(); |
| 72 | 73 |
| 73 private: | 74 private: |
| 74 explicit Performance(LocalFrame*); | 75 explicit Performance(LocalFrame*); |
| 75 | 76 |
| 76 // ContextLifecycleObserver overrides. | 77 // ContextLifecycleObserver overrides. |
| 77 void contextDestroyed(ExecutionContext*) override; | 78 void contextDestroyed(ExecutionContext*) override; |
| 78 | 79 |
| 80 std::unique_ptr<ResourceTimingInfo> getNavigationTimingInfo() const; |
| 81 |
| 82 PerformanceNavigationTiming* getNavigationTimingInstance() override; |
| 83 |
| 79 static std::pair<String, DOMWindow*> sanitizedAttribution( | 84 static std::pair<String, DOMWindow*> sanitizedAttribution( |
| 80 ExecutionContext*, | 85 ExecutionContext*, |
| 81 bool hasMultipleContexts, | 86 bool hasMultipleContexts, |
| 82 LocalFrame* observerFrame); | 87 LocalFrame* observerFrame); |
| 83 | 88 |
| 84 // PerformanceMonitor::Client implementation. | 89 // PerformanceMonitor::Client implementation. |
| 85 void reportLongTask(double startTime, | 90 void reportLongTask(double startTime, |
| 86 double endTime, | 91 double endTime, |
| 87 ExecutionContext* taskContext, | 92 ExecutionContext* taskContext, |
| 88 bool hasMultipleContexts) override; | 93 bool hasMultipleContexts) override; |
| 89 | 94 |
| 90 mutable Member<PerformanceNavigation> m_navigation; | 95 mutable Member<PerformanceNavigation> m_navigation; |
| 91 mutable Member<PerformanceTiming> m_timing; | 96 mutable Member<PerformanceTiming> m_timing; |
| 92 }; | 97 }; |
| 93 | 98 |
| 94 } // namespace blink | 99 } // namespace blink |
| 95 | 100 |
| 96 #endif // Performance_h | 101 #endif // Performance_h |
| OLD | NEW |