OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 { | 42 { |
43 }; | 43 }; |
44 | 44 |
45 bool wasClean; | 45 bool wasClean; |
46 unsigned short code; | 46 unsigned short code; |
47 String reason; | 47 String reason; |
48 }; | 48 }; |
49 | 49 |
50 class CloseEvent FINAL : public Event { | 50 class CloseEvent FINAL : public Event { |
51 public: | 51 public: |
52 static PassRefPtr<CloseEvent> create() | 52 static PassRefPtrWillBeRawPtr<CloseEvent> create() |
53 { | 53 { |
54 return adoptRef(new CloseEvent()); | 54 return adoptRefWillBeRefCountedGarbageCollected(new CloseEvent()); |
55 } | 55 } |
56 | 56 |
57 static PassRefPtr<CloseEvent> create(bool wasClean, unsigned short code, con
st String& reason) | 57 static PassRefPtrWillBeRawPtr<CloseEvent> create(bool wasClean, unsigned sho
rt code, const String& reason) |
58 { | 58 { |
59 return adoptRef(new CloseEvent(wasClean, code, reason)); | 59 return adoptRefWillBeRefCountedGarbageCollected(new CloseEvent(wasClean,
code, reason)); |
60 } | 60 } |
61 | 61 |
62 static PassRefPtr<CloseEvent> create(const AtomicString& type, const CloseEv
entInit& initializer) | 62 static PassRefPtrWillBeRawPtr<CloseEvent> create(const AtomicString& type, c
onst CloseEventInit& initializer) |
63 { | 63 { |
64 return adoptRef(new CloseEvent(type, initializer)); | 64 return adoptRefWillBeRefCountedGarbageCollected(new CloseEvent(type, ini
tializer)); |
65 } | 65 } |
66 | 66 |
67 bool wasClean() const { return m_wasClean; } | 67 bool wasClean() const { return m_wasClean; } |
68 unsigned short code() const { return m_code; } | 68 unsigned short code() const { return m_code; } |
69 String reason() const { return m_reason; } | 69 String reason() const { return m_reason; } |
70 | 70 |
71 // Event function. | 71 // Event function. |
72 virtual const AtomicString& interfaceName() const OVERRIDE { return EventNam
es::CloseEvent; } | 72 virtual const AtomicString& interfaceName() const OVERRIDE { return EventNam
es::CloseEvent; } |
73 | 73 |
74 virtual void trace(Visitor* visitor) OVERRIDE { Event::trace(visitor); } | 74 virtual void trace(Visitor* visitor) OVERRIDE { Event::trace(visitor); } |
(...skipping 26 matching lines...) Expand all Loading... |
101 } | 101 } |
102 | 102 |
103 bool m_wasClean; | 103 bool m_wasClean; |
104 unsigned short m_code; | 104 unsigned short m_code; |
105 String m_reason; | 105 String m_reason; |
106 }; | 106 }; |
107 | 107 |
108 } // namespace WebCore | 108 } // namespace WebCore |
109 | 109 |
110 #endif // CloseEvent_h | 110 #endif // CloseEvent_h |
OLD | NEW |