Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / Source / core / events / KeyboardEvent.h
index 4f71aeb..b240bee 100644 (file)
@@ -54,26 +54,26 @@ public:
         DOM_KEY_LOCATION_NUMPAD     = 0x03
     };
 
-    static PassRefPtr<KeyboardEvent> create()
+    static PassRefPtrWillBeRawPtr<KeyboardEvent> create()
     {
-        return adoptRef(new KeyboardEvent);
+        return adoptRefWillBeNoop(new KeyboardEvent);
     }
 
-    static PassRefPtr<KeyboardEvent> create(const PlatformKeyboardEvent& platformEvent, AbstractView* view)
+    static PassRefPtrWillBeRawPtr<KeyboardEvent> create(const PlatformKeyboardEvent& platformEvent, AbstractView* view)
     {
-        return adoptRef(new KeyboardEvent(platformEvent, view));
+        return adoptRefWillBeNoop(new KeyboardEvent(platformEvent, view));
     }
 
-    static PassRefPtr<KeyboardEvent> create(const AtomicString& type, const KeyboardEventInit& initializer)
+    static PassRefPtrWillBeRawPtr<KeyboardEvent> create(const AtomicString& type, const KeyboardEventInit& initializer)
     {
-        return adoptRef(new KeyboardEvent(type, initializer));
+        return adoptRefWillBeNoop(new KeyboardEvent(type, initializer));
     }
 
-    static PassRefPtr<KeyboardEvent> create(const AtomicString& type, bool canBubble, bool cancelable, AbstractView* view,
+    static PassRefPtrWillBeRawPtr<KeyboardEvent> create(const AtomicString& type, bool canBubble, bool cancelable, AbstractView* view,
         const String& keyIdentifier, unsigned location,
         bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, bool altGraphKey)
     {
-        return adoptRef(new KeyboardEvent(type, canBubble, cancelable, view, keyIdentifier, location,
+        return adoptRefWillBeNoop(new KeyboardEvent(type, canBubble, cancelable, view, keyIdentifier, location,
         ctrlKey, altKey, shiftKey, metaKey, altGraphKey));
     }
 
@@ -100,6 +100,8 @@ public:
     virtual bool isKeyboardEvent() const OVERRIDE;
     virtual int which() const OVERRIDE;
 
+    virtual void trace(Visitor*) OVERRIDE;
+
 private:
     KeyboardEvent();
     KeyboardEvent(const PlatformKeyboardEvent&, AbstractView*);
@@ -115,13 +117,11 @@ private:
     bool m_isAutoRepeat : 1;
 };
 
-KeyboardEvent* findKeyboardEvent(Event*);
-
 class KeyboardEventDispatchMediator : public EventDispatchMediator {
 public:
-    static PassRefPtr<KeyboardEventDispatchMediator> create(PassRefPtr<KeyboardEvent>);
+    static PassRefPtr<KeyboardEventDispatchMediator> create(PassRefPtrWillBeRawPtr<KeyboardEvent>);
 private:
-    explicit KeyboardEventDispatchMediator(PassRefPtr<KeyboardEvent>);
+    explicit KeyboardEventDispatchMediator(PassRefPtrWillBeRawPtr<KeyboardEvent>);
     virtual bool dispatchEvent(EventDispatcher*) const OVERRIDE;
 };