| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Julien Chaffraix <jchaffraix@webkit.org> | 2 * Copyright (C) 2010 Julien Chaffraix <jchaffraix@webkit.org> |
| 3 * All right reserved. | 3 * All right 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 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 // ProgressEvent overwrites the existing. I.e. only the latest one gets | 59 // ProgressEvent overwrites the existing. I.e. only the latest one gets |
| 60 // queued. If the timer is running, this method just updates | 60 // queued. If the timer is running, this method just updates |
| 61 // m_lengthComputable, m_loaded and m_total. They'll be used on next | 61 // m_lengthComputable, m_loaded and m_total. They'll be used on next |
| 62 // fired() call. | 62 // fired() call. |
| 63 void dispatchProgressEvent(const AtomicString&, bool lengthComputable, unsig
ned long long loaded, unsigned long long total); | 63 void dispatchProgressEvent(const AtomicString&, bool lengthComputable, unsig
ned long long loaded, unsigned long long total); |
| 64 void dispatchReadyStateChangeEvent(PassRefPtrWillBeRawPtr<Event>, ProgressEv
entAction = DoNotFlushProgressEvent); | 64 void dispatchReadyStateChangeEvent(PassRefPtrWillBeRawPtr<Event>, ProgressEv
entAction = DoNotFlushProgressEvent); |
| 65 | 65 |
| 66 void suspend(); | 66 void suspend(); |
| 67 void resume(); | 67 void resume(); |
| 68 | 68 |
| 69 void trace(Visitor*); | 69 virtual void trace(Visitor*); |
| 70 | 70 |
| 71 private: | 71 private: |
| 72 static const double minimumProgressEventDispatchingIntervalInSeconds; | 72 static const double minimumProgressEventDispatchingIntervalInSeconds; |
| 73 | 73 |
| 74 // Dispatches an event. If suspended, just queues the given event. | 74 // Dispatches an event. If suspended, just queues the given event. |
| 75 void dispatchEvent(PassRefPtrWillBeRawPtr<Event>); | 75 void dispatchEvent(PassRefPtrWillBeRawPtr<Event>); |
| 76 | 76 |
| 77 virtual void fired() OVERRIDE; | 77 virtual void fired() OVERRIDE; |
| 78 void dispatchDeferredEvents(Timer<XMLHttpRequestProgressEventThrottle>*); | 78 void dispatchDeferredEvents(Timer<XMLHttpRequestProgressEventThrottle>*); |
| 79 bool flushDeferredProgressEvent(); | 79 bool flushDeferredProgressEvent(); |
| (...skipping 13 matching lines...) Expand all Loading... |
| 93 | 93 |
| 94 bool m_deferEvents; | 94 bool m_deferEvents; |
| 95 RefPtrWillBeMember<Event> m_deferredProgressEvent; | 95 RefPtrWillBeMember<Event> m_deferredProgressEvent; |
| 96 WillBeHeapVector<RefPtrWillBeMember<Event> > m_deferredEvents; | 96 WillBeHeapVector<RefPtrWillBeMember<Event> > m_deferredEvents; |
| 97 Timer<XMLHttpRequestProgressEventThrottle> m_dispatchDeferredEventsTimer; | 97 Timer<XMLHttpRequestProgressEventThrottle> m_dispatchDeferredEventsTimer; |
| 98 }; | 98 }; |
| 99 | 99 |
| 100 } // namespace blink | 100 } // namespace blink |
| 101 | 101 |
| 102 #endif // XMLHttpRequestProgressEventThrottle_h | 102 #endif // XMLHttpRequestProgressEventThrottle_h |
| OLD | NEW |