| 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 28 matching lines...) Expand all Loading... |
| 39 #include "platform/heap/Handle.h" | 39 #include "platform/heap/Handle.h" |
| 40 #include "wtf/Forward.h" | 40 #include "wtf/Forward.h" |
| 41 #include "wtf/PassRefPtr.h" | 41 #include "wtf/PassRefPtr.h" |
| 42 #include "wtf/text/WTFString.h" | 42 #include "wtf/text/WTFString.h" |
| 43 | 43 |
| 44 namespace blink { | 44 namespace blink { |
| 45 | 45 |
| 46 class CloseEvent final : public Event { | 46 class CloseEvent final : public Event { |
| 47 DEFINE_WRAPPERTYPEINFO(); | 47 DEFINE_WRAPPERTYPEINFO(); |
| 48 public: | 48 public: |
| 49 static RawPtr<CloseEvent> create() | 49 static CloseEvent* create() |
| 50 { | 50 { |
| 51 return new CloseEvent(); | 51 return new CloseEvent(); |
| 52 } | 52 } |
| 53 | 53 |
| 54 static RawPtr<CloseEvent> create(bool wasClean, unsigned short code, const S
tring& reason) | 54 static CloseEvent* create(bool wasClean, unsigned short code, const String&
reason) |
| 55 { | 55 { |
| 56 return new CloseEvent(wasClean, code, reason); | 56 return new CloseEvent(wasClean, code, reason); |
| 57 } | 57 } |
| 58 | 58 |
| 59 static RawPtr<CloseEvent> create(const AtomicString& type, const CloseEventI
nit& initializer) | 59 static CloseEvent* create(const AtomicString& type, const CloseEventInit& in
itializer) |
| 60 { | 60 { |
| 61 return new CloseEvent(type, initializer); | 61 return new CloseEvent(type, initializer); |
| 62 } | 62 } |
| 63 | 63 |
| 64 bool wasClean() const { return m_wasClean; } | 64 bool wasClean() const { return m_wasClean; } |
| 65 unsigned short code() const { return m_code; } | 65 unsigned short code() const { return m_code; } |
| 66 String reason() const { return m_reason; } | 66 String reason() const { return m_reason; } |
| 67 | 67 |
| 68 // Event function. | 68 // Event function. |
| 69 const AtomicString& interfaceName() const override { return EventNames::Clos
eEvent; } | 69 const AtomicString& interfaceName() const override { return EventNames::Clos
eEvent; } |
| (...skipping 15 matching lines...) Expand all Loading... |
| 85 CloseEvent(const AtomicString& type, const CloseEventInit& initializer); | 85 CloseEvent(const AtomicString& type, const CloseEventInit& initializer); |
| 86 | 86 |
| 87 bool m_wasClean; | 87 bool m_wasClean; |
| 88 unsigned short m_code; | 88 unsigned short m_code; |
| 89 String m_reason; | 89 String m_reason; |
| 90 }; | 90 }; |
| 91 | 91 |
| 92 } // namespace blink | 92 } // namespace blink |
| 93 | 93 |
| 94 #endif // CloseEvent_h | 94 #endif // CloseEvent_h |
| OLD | NEW |