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

Side by Side Diff: third_party/WebKit/Source/core/html/shadow/MediaControls.h

Issue 2725873002: Media: fix memory leak because of the document holding on an EventListener. (Closed)
Patch Set: event-based Created 3 years, 9 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011, 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2011, 2012 Apple Inc. All rights reserved.
3 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. 3 * Copyright (C) 2011, 2012 Google 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 * 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 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 // do fit. This requires that m_panelWidth is current. 159 // do fit. This requires that m_panelWidth is current.
160 void computeWhichControlsFit(); 160 void computeWhichControlsFit();
161 161
162 // Node 162 // Node
163 bool isMediaControls() const override { return true; } 163 bool isMediaControls() const override { return true; }
164 bool willRespondToMouseMoveEvents() override { return true; } 164 bool willRespondToMouseMoveEvents() override { return true; }
165 void defaultEventHandler(Event*) override; 165 void defaultEventHandler(Event*) override;
166 bool containsRelatedTarget(Event*); 166 bool containsRelatedTarget(Event*);
167 167
168 // Methods called by MediaControlsMediaEventListener. 168 // Methods called by MediaControlsMediaEventListener.
169 void onInsertedIntoDocument();
170 void onRemovedFromDocument();
169 void onVolumeChange(); 171 void onVolumeChange();
170 void onFocusIn(); 172 void onFocusIn();
171 void onTimeUpdate(); 173 void onTimeUpdate();
172 void onDurationChange(); 174 void onDurationChange();
173 void onPlay(); 175 void onPlay();
174 void onPause(); 176 void onPause();
175 void onTextTracksAddedOrRemoved(); 177 void onTextTracksAddedOrRemoved();
176 void onTextTracksChanged(); 178 void onTextTracksChanged();
177 void onError(); 179 void onError();
178 void onLoadedMetadata(); 180 void onLoadedMetadata();
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 int m_panelWidth; 223 int m_panelWidth;
222 224
223 bool m_keepShowingUntilTimerFires : 1; 225 bool m_keepShowingUntilTimerFires : 1;
224 }; 226 };
225 227
226 DEFINE_ELEMENT_TYPE_CASTS(MediaControls, isMediaControls()); 228 DEFINE_ELEMENT_TYPE_CASTS(MediaControls, isMediaControls());
227 229
228 } // namespace blink 230 } // namespace blink
229 231
230 #endif 232 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698