Commit 0aa10639 authored by haraken's avatar haraken Committed by Commit bot

Remove DOMWindowProperty from Performance

We're deprecating DOMWindowProperty, which is equivalent to ContextLifecycleObserver.
This CL does the replacement for Performance.

BUG=610176

Review-Url: https://codereview.chromium.org/2569153002
Cr-Commit-Position: refs/heads/master@{#438155}
parent c269a43c
...@@ -100,16 +100,16 @@ static double toTimeOrigin(LocalFrame* frame) { ...@@ -100,16 +100,16 @@ static double toTimeOrigin(LocalFrame* frame) {
} }
Performance::Performance(LocalFrame* frame) Performance::Performance(LocalFrame* frame)
: PerformanceBase(toTimeOrigin(frame)), DOMWindowProperty(frame) {} : PerformanceBase(toTimeOrigin(frame)),
ContextLifecycleObserver(frame ? frame->document() : nullptr) {}
Performance::~Performance() { Performance::~Performance() {
if (frame()) if (frame())
frame()->performanceMonitor()->unsubscribeAll(this); frame()->performanceMonitor()->unsubscribeAll(this);
} }
void Performance::frameDestroyed() { void Performance::contextDestroyed() {
frame()->performanceMonitor()->unsubscribeAll(this); frame()->performanceMonitor()->unsubscribeAll(this);
DOMWindowProperty::frameDestroyed();
} }
ExecutionContext* Performance::getExecutionContext() const { ExecutionContext* Performance::getExecutionContext() const {
...@@ -161,7 +161,7 @@ ScriptValue Performance::toJSONForBinding(ScriptState* scriptState) const { ...@@ -161,7 +161,7 @@ ScriptValue Performance::toJSONForBinding(ScriptState* scriptState) const {
DEFINE_TRACE(Performance) { DEFINE_TRACE(Performance) {
visitor->trace(m_navigation); visitor->trace(m_navigation);
visitor->trace(m_timing); visitor->trace(m_timing);
DOMWindowProperty::trace(visitor); ContextLifecycleObserver::trace(visitor);
PerformanceBase::trace(visitor); PerformanceBase::trace(visitor);
PerformanceMonitor::Client::trace(visitor); PerformanceMonitor::Client::trace(visitor);
} }
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
#define Performance_h #define Performance_h
#include "core/CoreExport.h" #include "core/CoreExport.h"
#include "core/frame/DOMWindowProperty.h" #include "core/dom/ContextLifecycleObserver.h"
#include "core/frame/PerformanceMonitor.h" #include "core/frame/PerformanceMonitor.h"
#include "core/timing/MemoryInfo.h" #include "core/timing/MemoryInfo.h"
#include "core/timing/PerformanceBase.h" #include "core/timing/PerformanceBase.h"
...@@ -46,7 +46,7 @@ class ScriptState; ...@@ -46,7 +46,7 @@ class ScriptState;
class ScriptValue; class ScriptValue;
class CORE_EXPORT Performance final : public PerformanceBase, class CORE_EXPORT Performance final : public PerformanceBase,
public DOMWindowProperty, public ContextLifecycleObserver,
public PerformanceMonitor::Client { public PerformanceMonitor::Client {
DEFINE_WRAPPERTYPEINFO(); DEFINE_WRAPPERTYPEINFO();
USING_GARBAGE_COLLECTED_MIXIN(Performance); USING_GARBAGE_COLLECTED_MIXIN(Performance);
...@@ -73,8 +73,8 @@ class CORE_EXPORT Performance final : public PerformanceBase, ...@@ -73,8 +73,8 @@ class CORE_EXPORT Performance final : public PerformanceBase,
private: private:
explicit Performance(LocalFrame*); explicit Performance(LocalFrame*);
// DOMWindowProperty overrides. // ContextLifecycleObserver overrides.
void frameDestroyed() override; void contextDestroyed() override;
static std::pair<String, DOMWindow*> sanitizedAttribution( static std::pair<String, DOMWindow*> sanitizedAttribution(
ExecutionContext*, ExecutionContext*,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment