Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(281)

Unified Diff: third_party/WebKit/Source/modules/netinfo/NetworkInformation.cpp

Issue 1942723004: Change EventTarget callback APIs for add/RemoveEventListenerInternal. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix win32 signed/unsigned issue Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/netinfo/NetworkInformation.cpp
diff --git a/third_party/WebKit/Source/modules/netinfo/NetworkInformation.cpp b/third_party/WebKit/Source/modules/netinfo/NetworkInformation.cpp
index 783623dc257493d9d2789c15334ae4895a04e93f..e4ddde2df7d97ede43848b57d3e3c08524b5cf22 100644
--- a/third_party/WebKit/Source/modules/netinfo/NetworkInformation.cpp
+++ b/third_party/WebKit/Source/modules/netinfo/NetworkInformation.cpp
@@ -103,21 +103,17 @@ ExecutionContext* NetworkInformation::getExecutionContext() const
return ActiveDOMObject::getExecutionContext();
}
-bool NetworkInformation::addEventListenerInternal(const AtomicString& eventType, EventListener* listener, const EventListenerOptions& options)
+void NetworkInformation::addedEventListener(const AtomicString& eventType, RegisteredEventListener& registeredListener)
{
- if (!EventTargetWithInlineData::addEventListenerInternal(eventType, listener, options))
- return false;
+ EventTargetWithInlineData::addedEventListener(eventType, registeredListener);
startObserving();
- return true;
}
-bool NetworkInformation::removeEventListenerInternal(const AtomicString& eventType, EventListener* listener, const EventListenerOptions& options)
+void NetworkInformation::removedEventListener(const AtomicString& eventType, const RegisteredEventListener& registeredListener)
{
- if (!EventTargetWithInlineData::removeEventListenerInternal(eventType, listener, options))
- return false;
+ EventTargetWithInlineData::removedEventListener(eventType, registeredListener);
if (!hasEventListeners())
stopObserving();
- return true;
}
void NetworkInformation::removeAllEventListeners()

Powered by Google App Engine
This is Rietveld 408576698