Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(148)

Side by Side Diff: Source/core/dom/GenericEventQueue.h

Issue 15739014: Avoid referencing an HTMLMediaElement if is currently being deleted (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Victor Carbune (victor@rosedu.org) 2 * Copyright (C) 2012 Victor Carbune (victor@rosedu.org)
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 29 matching lines...) Expand all
40 public: 40 public:
41 explicit GenericEventQueue(EventTarget*); 41 explicit GenericEventQueue(EventTarget*);
42 static PassOwnPtr<GenericEventQueue> create(EventTarget*); 42 static PassOwnPtr<GenericEventQueue> create(EventTarget*);
43 virtual ~GenericEventQueue(); 43 virtual ~GenericEventQueue();
44 44
45 // EventQueue 45 // EventQueue
46 virtual bool enqueueEvent(PassRefPtr<Event>) OVERRIDE; 46 virtual bool enqueueEvent(PassRefPtr<Event>) OVERRIDE;
47 virtual bool cancelEvent(Event*) OVERRIDE; 47 virtual bool cancelEvent(Event*) OVERRIDE;
48 virtual void close() OVERRIDE; 48 virtual void close() OVERRIDE;
49 49
50 // Implicit target is considered the owner of the queue.
51 bool enqueueEventWithoutTarget(PassRefPtr<Event>);
52
50 void cancelAllEvents(); 53 void cancelAllEvents();
51 bool hasPendingEvents() const; 54 bool hasPendingEvents() const;
52 55
53 private: 56 private:
54 void timerFired(Timer<GenericEventQueue>*); 57 void timerFired(Timer<GenericEventQueue>*);
55 58
56 EventTarget* m_owner; 59 EventTarget* m_owner;
57 Vector<RefPtr<Event> > m_pendingEvents; 60 Vector<RefPtr<Event> > m_pendingEvents;
58 Timer<GenericEventQueue> m_timer; 61 Timer<GenericEventQueue> m_timer;
59 62
60 bool m_isClosed; 63 bool m_isClosed;
61 }; 64 };
62 65
63 } 66 }
64 67
65 #endif 68 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698