OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Google Inc. All Rights Reserved. | 2 * Copyright (C) 2010 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 | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 static PassRefPtr<DocumentEventQueue> create(ScriptExecutionContext*); | 52 static PassRefPtr<DocumentEventQueue> create(ScriptExecutionContext*); |
53 virtual ~DocumentEventQueue(); | 53 virtual ~DocumentEventQueue(); |
54 | 54 |
55 // EventQueue | 55 // EventQueue |
56 virtual bool enqueueEvent(PassRefPtr<Event>) OVERRIDE; | 56 virtual bool enqueueEvent(PassRefPtr<Event>) OVERRIDE; |
57 virtual bool cancelEvent(Event*) OVERRIDE; | 57 virtual bool cancelEvent(Event*) OVERRIDE; |
58 virtual void close() OVERRIDE; | 58 virtual void close() OVERRIDE; |
59 | 59 |
60 void enqueueOrDispatchScrollEvent(PassRefPtr<Node>, ScrollEventTargetType); | 60 void enqueueOrDispatchScrollEvent(PassRefPtr<Node>, ScrollEventTargetType); |
61 | 61 |
62 void reportMemoryUsage(MemoryObjectInfo*) const; | |
63 | |
64 private: | 62 private: |
65 explicit DocumentEventQueue(ScriptExecutionContext*); | 63 explicit DocumentEventQueue(ScriptExecutionContext*); |
66 | 64 |
67 void pendingEventTimerFired(); | 65 void pendingEventTimerFired(); |
68 void dispatchEvent(PassRefPtr<Event>); | 66 void dispatchEvent(PassRefPtr<Event>); |
69 | 67 |
70 OwnPtr<DocumentEventQueueTimer> m_pendingEventTimer; | 68 OwnPtr<DocumentEventQueueTimer> m_pendingEventTimer; |
71 ListHashSet<RefPtr<Event>, 16> m_queuedEvents; | 69 ListHashSet<RefPtr<Event>, 16> m_queuedEvents; |
72 HashSet<Node*> m_nodesWithQueuedScrollEvents; | 70 HashSet<Node*> m_nodesWithQueuedScrollEvents; |
73 bool m_isClosed; | 71 bool m_isClosed; |
74 | 72 |
75 friend class DocumentEventQueueTimer; | 73 friend class DocumentEventQueueTimer; |
76 }; | 74 }; |
77 | 75 |
78 } | 76 } |
79 | 77 |
80 #endif // DocumentEventQueue_h | 78 #endif // DocumentEventQueue_h |
OLD | NEW |