| Index: third_party/WebKit/Source/core/html/shadow/MediaControlsOrientationLockDelegate.cpp
|
| diff --git a/third_party/WebKit/Source/core/html/shadow/MediaControlsOrientationLockDelegate.cpp b/third_party/WebKit/Source/core/html/shadow/MediaControlsOrientationLockDelegate.cpp
|
| index 624bb9d699665c15f24c9a04de2425fe35b4b8a1..f29c4c5e96961e78a9d3f10d87f856742bdb2348 100644
|
| --- a/third_party/WebKit/Source/core/html/shadow/MediaControlsOrientationLockDelegate.cpp
|
| +++ b/third_party/WebKit/Source/core/html/shadow/MediaControlsOrientationLockDelegate.cpp
|
| @@ -64,12 +64,25 @@ class DummyScreenOrientationCallback : public WebLockOrientationCallback {
|
| MediaControlsOrientationLockDelegate::MediaControlsOrientationLockDelegate(
|
| HTMLVideoElement& video)
|
| : EventListener(CPPEventListenerType), m_videoElement(video) {
|
| + if (videoElement().isConnected())
|
| + attach();
|
| +}
|
| +
|
| +void MediaControlsOrientationLockDelegate::attach() {
|
| document().addEventListener(EventTypeNames::fullscreenchange, this, true);
|
| videoElement().addEventListener(EventTypeNames::webkitfullscreenchange, this,
|
| true);
|
| videoElement().addEventListener(EventTypeNames::loadedmetadata, this, true);
|
| }
|
|
|
| +void MediaControlsOrientationLockDelegate::detach() {
|
| + document().removeEventListener(EventTypeNames::fullscreenchange, this, true);
|
| + videoElement().removeEventListener(EventTypeNames::webkitfullscreenchange,
|
| + this, true);
|
| + videoElement().removeEventListener(EventTypeNames::loadedmetadata, this,
|
| + true);
|
| +}
|
| +
|
| bool MediaControlsOrientationLockDelegate::operator==(
|
| const EventListener& other) const {
|
| return this == &other;
|
|
|