Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / Source / modules / netinfo / NetworkInformation.h
index 695e3f3..2011dec 100644 (file)
@@ -5,38 +5,36 @@
 #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.
@@ -51,7 +49,7 @@ private:
     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;
@@ -60,6 +58,6 @@ private:
     bool m_contextStopped;
 };
 
-} // namespace WebCore
+} // namespace blink
 
 #endif // NetworkInformation_h