| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009, 2012 Ericsson AB. All rights reserved. | 2 * Copyright (C) 2009, 2012 Ericsson AB. All rights reserved. |
| 3 * Copyright (C) 2010 Apple Inc. All rights reserved. | 3 * Copyright (C) 2010 Apple Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * | 8 * |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(EventSource); | 56 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(EventSource); |
| 57 public: | 57 public: |
| 58 static EventSource* create(ExecutionContext*, const String& url, const Event
SourceInit&, ExceptionState&); | 58 static EventSource* create(ExecutionContext*, const String& url, const Event
SourceInit&, ExceptionState&); |
| 59 ~EventSource() override; | 59 ~EventSource() override; |
| 60 | 60 |
| 61 static const unsigned long long defaultReconnectDelay; | 61 static const unsigned long long defaultReconnectDelay; |
| 62 | 62 |
| 63 String url() const; | 63 String url() const; |
| 64 bool withCredentials() const; | 64 bool withCredentials() const; |
| 65 | 65 |
| 66 typedef short State; | 66 enum State : short { |
| 67 static const State CONNECTING = 0; | 67 CONNECTING = 0, |
| 68 static const State OPEN = 1; | 68 OPEN = 1, |
| 69 static const State CLOSED = 2; | 69 CLOSED = 2 |
| 70 }; |
| 70 | 71 |
| 71 State readyState() const; | 72 State readyState() const; |
| 72 | 73 |
| 73 DEFINE_ATTRIBUTE_EVENT_LISTENER(open); | 74 DEFINE_ATTRIBUTE_EVENT_LISTENER(open); |
| 74 DEFINE_ATTRIBUTE_EVENT_LISTENER(message); | 75 DEFINE_ATTRIBUTE_EVENT_LISTENER(message); |
| 75 DEFINE_ATTRIBUTE_EVENT_LISTENER(error); | 76 DEFINE_ATTRIBUTE_EVENT_LISTENER(error); |
| 76 | 77 |
| 77 void close(); | 78 void close(); |
| 78 | 79 |
| 79 const AtomicString& interfaceName() const override; | 80 const AtomicString& interfaceName() const override; |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 Vector<UChar> m_data; | 127 Vector<UChar> m_data; |
| 127 AtomicString m_currentlyParsedEventId; | 128 AtomicString m_currentlyParsedEventId; |
| 128 AtomicString m_lastEventId; | 129 AtomicString m_lastEventId; |
| 129 unsigned long long m_reconnectDelay; | 130 unsigned long long m_reconnectDelay; |
| 130 String m_eventStreamOrigin; | 131 String m_eventStreamOrigin; |
| 131 }; | 132 }; |
| 132 | 133 |
| 133 } // namespace blink | 134 } // namespace blink |
| 134 | 135 |
| 135 #endif // EventSource_h | 136 #endif // EventSource_h |
| OLD | NEW |