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

Side by Side Diff: third_party/WebKit/Source/core/html/HTMLMediaElement.cpp

Issue 1827853002: [Android, RemotePlayback] Implement HTMLMediaElement.remote.connect(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remote-playback-availability
Patch Set: Fixed timing for rejecting the promises Created 4 years, 8 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) 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights reserved. 2 * Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple 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 400 matching lines...) Expand 10 before | Expand all | Expand 10 after
411 , m_inOverlayFullscreenVideo(false) 411 , m_inOverlayFullscreenVideo(false)
412 , m_audioTracks(AudioTrackList::create(*this)) 412 , m_audioTracks(AudioTrackList::create(*this))
413 , m_videoTracks(VideoTrackList::create(*this)) 413 , m_videoTracks(VideoTrackList::create(*this))
414 , m_textTracks(nullptr) 414 , m_textTracks(nullptr)
415 , m_playPromiseResolveTask(CancellableTaskFactory::create(this, &HTMLMediaEl ement::resolvePlayPromises)) 415 , m_playPromiseResolveTask(CancellableTaskFactory::create(this, &HTMLMediaEl ement::resolvePlayPromises))
416 , m_playPromiseRejectTask(CancellableTaskFactory::create(this, &HTMLMediaEle ment::rejectPlayPromises)) 416 , m_playPromiseRejectTask(CancellableTaskFactory::create(this, &HTMLMediaEle ment::rejectPlayPromises))
417 , m_audioSourceNode(nullptr) 417 , m_audioSourceNode(nullptr)
418 , m_autoplayHelperClient(AutoplayHelperClientImpl::create(this)) 418 , m_autoplayHelperClient(AutoplayHelperClientImpl::create(this))
419 , m_autoplayHelper(AutoplayExperimentHelper::create(m_autoplayHelperClient.g et())) 419 , m_autoplayHelper(AutoplayExperimentHelper::create(m_autoplayHelperClient.g et()))
420 , m_remotePlaybackClient(nullptr) 420 , m_remotePlaybackClient(nullptr)
421 #if !ENABLE(OILPAN)
422 , m_weakPtrFactory(this)
423 #endif
421 { 424 {
422 #if ENABLE(OILPAN) 425 #if ENABLE(OILPAN)
423 ThreadState::current()->registerPreFinalizer(this); 426 ThreadState::current()->registerPreFinalizer(this);
424 #endif 427 #endif
425 428
426 WTF_LOG(Media, "HTMLMediaElement::HTMLMediaElement(%p)", this); 429 WTF_LOG(Media, "HTMLMediaElement::HTMLMediaElement(%p)", this);
427 430
428 if (document.settings() && document.settings()->mediaPlaybackRequiresUserGes ture()) 431 if (document.settings() && document.settings()->mediaPlaybackRequiresUserGes ture())
429 m_userGestureRequiredForPlay = true; 432 m_userGestureRequiredForPlay = true;
430 433
(...skipping 3424 matching lines...) Expand 10 before | Expand all | Expand 10 after
3855 } 3858 }
3856 3859
3857 IntRect HTMLMediaElement::AutoplayHelperClientImpl::absoluteBoundingBoxRect() co nst 3860 IntRect HTMLMediaElement::AutoplayHelperClientImpl::absoluteBoundingBoxRect() co nst
3858 { 3861 {
3859 IntRect result; 3862 IntRect result;
3860 if (LayoutObject* object = m_element->layoutObject()) 3863 if (LayoutObject* object = m_element->layoutObject())
3861 result = object->absoluteBoundingBoxRect(); 3864 result = object->absoluteBoundingBoxRect();
3862 return result; 3865 return result;
3863 } 3866 }
3864 3867
3868 #if !ENABLE(OILPAN)
3869 WeakPtr<HTMLMediaElement> HTMLMediaElement::createWeakPtr()
3870 {
3871 return m_weakPtrFactory.createWeakPtr();
3872 }
3873 #endif
3874
3865 } // namespace blink 3875 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698