diff options
3 files changed, 6 insertions, 2 deletions
diff --git a/third_party/WebKit/Source/core/frame/Deprecation.cpp b/third_party/WebKit/Source/core/frame/Deprecation.cpp index c8ed596..5a50d6f 100644 --- a/third_party/WebKit/Source/core/frame/Deprecation.cpp +++ b/third_party/WebKit/Source/core/frame/Deprecation.cpp @@ -329,6 +329,9 @@ String Deprecation::deprecationMessage(UseCounter::Feature feature) case UseCounter::WebAnimationHyphenatedProperty: return replacedWillBeRemoved("Hyphenated naming in Web Animations keyframes", "camelCase", 51, "5650817352728576"); + case UseCounter::PresentationConnectionStateChangeEventListener: + return replacedWillBeRemoved("'PresentationConnection.onstateachange'", "'PresentationConnection.on{connect,close,terminate}'", 51, "5662456714100736"); + // Features that aren't deprecated don't have a deprecation message. default: return String(); diff --git a/third_party/WebKit/Source/modules/presentation/PresentationConnection.cpp b/third_party/WebKit/Source/modules/presentation/PresentationConnection.cpp index 5f08a4a..716c872 100644 --- a/third_party/WebKit/Source/modules/presentation/PresentationConnection.cpp +++ b/third_party/WebKit/Source/modules/presentation/PresentationConnection.cpp @@ -13,6 +13,7 @@ #include "core/events/MessageEvent.h" #include "core/fileapi/FileReaderLoader.h" #include "core/fileapi/FileReaderLoaderClient.h" +#include "core/frame/Deprecation.h" #include "core/frame/LocalFrame.h" #include "core/frame/UseCounter.h" #include "modules/EventTargetModules.h" @@ -185,7 +186,7 @@ ExecutionContext* PresentationConnection::executionContext() const bool PresentationConnection::addEventListenerInternal(const AtomicString& eventType, PassRefPtrWillBeRawPtr<EventListener> listener, const EventListenerOptions& options) { if (eventType == EventTypeNames::statechange) - UseCounter::count(executionContext(), UseCounter::PresentationConnectionStateChangeEventListener); + Deprecation::countDeprecation(executionContext(), UseCounter::PresentationConnectionStateChangeEventListener); else if (eventType == EventTypeNames::connect) UseCounter::count(executionContext(), UseCounter::PresentationConnectionConnectEventListener); else if (eventType == EventTypeNames::close) diff --git a/third_party/WebKit/Source/modules/presentation/PresentationConnection.idl b/third_party/WebKit/Source/modules/presentation/PresentationConnection.idl index cea1af86..0210567 100644 --- a/third_party/WebKit/Source/modules/presentation/PresentationConnection.idl +++ b/third_party/WebKit/Source/modules/presentation/PresentationConnection.idl @@ -18,7 +18,7 @@ enum PresentationConnectionState { readonly attribute PresentationConnectionState state; [MeasureAs=PresentationConnectionClose] void close(); [MeasureAs=PresentationConnectionTerminate] void terminate(); - attribute EventHandler onstatechange; + [DeprecateAs=PresentationConnectionStateChangeEventListener] attribute EventHandler onstatechange; attribute EventHandler onconnect; attribute EventHandler onclose; attribute EventHandler onterminate; |