#ifndef NetworkInformation_h
#define NetworkInformation_h
-#include "bindings/v8/ScriptWrappable.h"
#include "core/dom/ActiveDOMObject.h"
#include "core/events/EventTarget.h"
#include "core/page/NetworkStateNotifier.h"
#include "public/platform/WebConnectionType.h"
-namespace WebCore {
+namespace blink {
class ExecutionContext;
class NetworkInformation FINAL
- : public RefCountedWillBeRefCountedGarbageCollected<NetworkInformation>
- , public ScriptWrappable
+ : public RefCountedGarbageCollectedWillBeGarbageCollectedFinalized<NetworkInformation>
, public ActiveDOMObject
, public EventTargetWithInlineData
, public NetworkStateNotifier::NetworkStateObserver {
- REFCOUNTED_EVENT_TARGET(NetworkInformation);
+ DEFINE_EVENT_TARGET_REFCOUNTING_WILL_BE_REMOVED(RefCountedGarbageCollected<NetworkInformation>);
+ DEFINE_WRAPPERTYPEINFO();
WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(NetworkInformation);
-
public:
- static PassRefPtrWillBeRawPtr<NetworkInformation> create(ExecutionContext*);
+ static NetworkInformation* create(ExecutionContext*);
virtual ~NetworkInformation();
String type() const;
- virtual void connectionTypeChange(blink::WebConnectionType) OVERRIDE;
+ virtual void connectionTypeChange(WebConnectionType) OVERRIDE;
// EventTarget overrides.
virtual const AtomicString& interfaceName() const OVERRIDE;
virtual ExecutionContext* executionContext() const OVERRIDE;
virtual bool addEventListener(const AtomicString& eventType, PassRefPtr<EventListener>, bool useCapture = false) OVERRIDE;
- virtual bool removeEventListener(const AtomicString& eventType, EventListener*, bool useCapture = false) OVERRIDE;
+ virtual bool removeEventListener(const AtomicString& eventType, PassRefPtr<EventListener>, bool useCapture = false) OVERRIDE;
virtual void removeAllEventListeners() OVERRIDE;
// ActiveDOMObject overrides.
void stopObserving();
// Touched only on context thread.
- blink::WebConnectionType m_type;
+ WebConnectionType m_type;
// Whether this object is listening for events from NetworkStateNotifier.
bool m_observing;
bool m_contextStopped;
};
-} // namespace WebCore
+} // namespace blink
#endif // NetworkInformation_h