| 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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 | 64 |
| 65 namespace blink { | 65 namespace blink { |
| 66 | 66 |
| 67 DOMWebSocket::EventQueue::EventQueue(EventTarget* target) | 67 DOMWebSocket::EventQueue::EventQueue(EventTarget* target) |
| 68 : m_state(Active) | 68 : m_state(Active) |
| 69 , m_target(target) | 69 , m_target(target) |
| 70 , m_resumeTimer(this, &EventQueue::resumeTimerFired) { } | 70 , m_resumeTimer(this, &EventQueue::resumeTimerFired) { } |
| 71 | 71 |
| 72 DOMWebSocket::EventQueue::~EventQueue() { stop(); } | 72 DOMWebSocket::EventQueue::~EventQueue() { stop(); } |
| 73 | 73 |
| 74 void DOMWebSocket::EventQueue::dispatch(RawPtr<Event> event) | 74 void DOMWebSocket::EventQueue::dispatch(Event* event) |
| 75 { | 75 { |
| 76 switch (m_state) { | 76 switch (m_state) { |
| 77 case Active: | 77 case Active: |
| 78 ASSERT(m_events.isEmpty()); | 78 ASSERT(m_events.isEmpty()); |
| 79 ASSERT(m_target->getExecutionContext()); | 79 ASSERT(m_target->getExecutionContext()); |
| 80 m_target->dispatchEvent(event); | 80 m_target->dispatchEvent(event); |
| 81 break; | 81 break; |
| 82 case Suspended: | 82 case Suspended: |
| 83 m_events.append(event); | 83 m_events.append(event); |
| 84 break; | 84 break; |
| (...skipping 629 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 714 DEFINE_TRACE(DOMWebSocket) | 714 DEFINE_TRACE(DOMWebSocket) |
| 715 { | 715 { |
| 716 visitor->trace(m_channel); | 716 visitor->trace(m_channel); |
| 717 visitor->trace(m_eventQueue); | 717 visitor->trace(m_eventQueue); |
| 718 WebSocketChannelClient::trace(visitor); | 718 WebSocketChannelClient::trace(visitor); |
| 719 RefCountedGarbageCollectedEventTargetWithInlineData<DOMWebSocket>::trace(vis
itor); | 719 RefCountedGarbageCollectedEventTargetWithInlineData<DOMWebSocket>::trace(vis
itor); |
| 720 ActiveDOMObject::trace(visitor); | 720 ActiveDOMObject::trace(visitor); |
| 721 } | 721 } |
| 722 | 722 |
| 723 } // namespace blink | 723 } // namespace blink |
| OLD | NEW |