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

Side by Side Diff: third_party/WebKit/Source/web/FrameLoaderClientImpl.cpp

Issue 1585163002: Media Session: prepare for implicit activation of user created session (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add parameter names, also for unused variables Created 4 years, 11 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) 2009, 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2009, 2012 Google Inc. All rights reserved.
3 * Copyright (C) 2011 Apple Inc. All rights reserved. 3 * Copyright (C) 2011 Apple 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 are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 #include "core/loader/HistoryItem.h" 51 #include "core/loader/HistoryItem.h"
52 #include "core/page/Page.h" 52 #include "core/page/Page.h"
53 #include "core/page/WindowFeatures.h" 53 #include "core/page/WindowFeatures.h"
54 #include "modules/audio_output_devices/HTMLMediaElementAudioOutputDevice.h" 54 #include "modules/audio_output_devices/HTMLMediaElementAudioOutputDevice.h"
55 #include "modules/device_light/DeviceLightController.h" 55 #include "modules/device_light/DeviceLightController.h"
56 #include "modules/device_orientation/DeviceMotionController.h" 56 #include "modules/device_orientation/DeviceMotionController.h"
57 #include "modules/device_orientation/DeviceOrientationAbsoluteController.h" 57 #include "modules/device_orientation/DeviceOrientationAbsoluteController.h"
58 #include "modules/device_orientation/DeviceOrientationController.h" 58 #include "modules/device_orientation/DeviceOrientationController.h"
59 #include "modules/encryptedmedia/HTMLMediaElementEncryptedMedia.h" 59 #include "modules/encryptedmedia/HTMLMediaElementEncryptedMedia.h"
60 #include "modules/gamepad/NavigatorGamepad.h" 60 #include "modules/gamepad/NavigatorGamepad.h"
61 #include "modules/mediasession/HTMLMediaElementMediaSession.h"
61 #include "modules/mediasession/MediaSession.h" 62 #include "modules/mediasession/MediaSession.h"
62 #include "modules/serviceworkers/NavigatorServiceWorker.h" 63 #include "modules/serviceworkers/NavigatorServiceWorker.h"
63 #include "modules/storage/DOMWindowStorageController.h" 64 #include "modules/storage/DOMWindowStorageController.h"
64 #include "modules/vr/NavigatorVRDevice.h" 65 #include "modules/vr/NavigatorVRDevice.h"
65 #include "platform/MIMETypeRegistry.h" 66 #include "platform/MIMETypeRegistry.h"
66 #include "platform/RuntimeEnabledFeatures.h" 67 #include "platform/RuntimeEnabledFeatures.h"
67 #include "platform/UserGestureIndicator.h" 68 #include "platform/UserGestureIndicator.h"
68 #include "platform/exported/WrappedResourceRequest.h" 69 #include "platform/exported/WrappedResourceRequest.h"
69 #include "platform/exported/WrappedResourceResponse.h" 70 #include "platform/exported/WrappedResourceResponse.h"
70 #include "platform/fonts/GlyphPageTreeNode.h" 71 #include "platform/fonts/GlyphPageTreeNode.h"
(...skipping 740 matching lines...) Expand 10 before | Expand all | Expand 10 after
811 WebMediaPlayer::LoadType loadType, 812 WebMediaPlayer::LoadType loadType,
812 const WebURL& url, 813 const WebURL& url,
813 WebMediaPlayerClient* client) 814 WebMediaPlayerClient* client)
814 { 815 {
815 WebLocalFrameImpl* webFrame = WebLocalFrameImpl::fromFrame( 816 WebLocalFrameImpl* webFrame = WebLocalFrameImpl::fromFrame(
816 htmlMediaElement.document().frame()); 817 htmlMediaElement.document().frame());
817 818
818 if (!webFrame || !webFrame->client()) 819 if (!webFrame || !webFrame->client())
819 return nullptr; 820 return nullptr;
820 821
822 WebMediaSession* webMediaSession = nullptr;
823 if (MediaSession* mediaSession = HTMLMediaElementMediaSession::session(htmlM ediaElement))
824 webMediaSession = mediaSession->webMediaSession();
825
821 HTMLMediaElementEncryptedMedia& encryptedMedia = HTMLMediaElementEncryptedMe dia::from(htmlMediaElement); 826 HTMLMediaElementEncryptedMedia& encryptedMedia = HTMLMediaElementEncryptedMe dia::from(htmlMediaElement);
822 WebString sinkId(HTMLMediaElementAudioOutputDevice::sinkId(htmlMediaElement) ); 827 WebString sinkId(HTMLMediaElementAudioOutputDevice::sinkId(htmlMediaElement) );
823 return adoptPtr(webFrame->client()->createMediaPlayer(webFrame, loadType, ur l, 828 return adoptPtr(webFrame->client()->createMediaPlayer(webFrame, loadType, ur l,
824 client, &encryptedMedia, 829 client, &encryptedMedia,
825 encryptedMedia.contentDecryptionModule(), sinkId)); 830 encryptedMedia.contentDecryptionModule(), sinkId, webMediaSession));
826 } 831 }
827 832
828 PassOwnPtr<WebMediaSession> FrameLoaderClientImpl::createWebMediaSession() 833 PassOwnPtr<WebMediaSession> FrameLoaderClientImpl::createWebMediaSession()
829 { 834 {
830 if (!m_webFrame->client()) 835 if (!m_webFrame->client())
831 return nullptr; 836 return nullptr;
832 837
833 return adoptPtr(m_webFrame->client()->createMediaSession()); 838 return adoptPtr(m_webFrame->client()->createMediaSession());
834 } 839 }
835 840
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
1021 1026
1022 void FrameLoaderClientImpl::suddenTerminationDisablerChanged(bool present, Sudde nTerminationDisablerType type) 1027 void FrameLoaderClientImpl::suddenTerminationDisablerChanged(bool present, Sudde nTerminationDisablerType type)
1023 { 1028 {
1024 if (m_webFrame->client()) { 1029 if (m_webFrame->client()) {
1025 m_webFrame->client()->suddenTerminationDisablerChanged( 1030 m_webFrame->client()->suddenTerminationDisablerChanged(
1026 present, static_cast<WebFrameClient::SuddenTerminationDisablerType>( type)); 1031 present, static_cast<WebFrameClient::SuddenTerminationDisablerType>( type));
1027 } 1032 }
1028 } 1033 }
1029 1034
1030 } // namespace blink 1035 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/mediasession/MediaSession.h ('k') | third_party/WebKit/public/web/WebFrameClient.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698