OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "config.h" | 5 #include "config.h" |
6 #include "web/WebMediaPlayerClientImpl.h" | 6 #include "web/WebMediaPlayerClientImpl.h" |
7 | 7 |
8 #include "core/frame/LocalFrame.h" | 8 #include "core/frame/LocalFrame.h" |
9 #include "core/html/HTMLMediaElement.h" | 9 #include "core/html/HTMLMediaElement.h" |
10 #include "core/html/TimeRanges.h" | 10 #include "core/html/TimeRanges.h" |
(...skipping 27 matching lines...) Expand all Loading... |
38 #include "wtf/text/CString.h" | 38 #include "wtf/text/CString.h" |
39 | 39 |
40 namespace blink { | 40 namespace blink { |
41 | 41 |
42 static PassOwnPtr<WebMediaPlayer> createWebMediaPlayer(WebMediaPlayerClient* cli
ent, const WebURL& url, LocalFrame* frame, WebContentDecryptionModule* initialCd
m) | 42 static PassOwnPtr<WebMediaPlayer> createWebMediaPlayer(WebMediaPlayerClient* cli
ent, const WebURL& url, LocalFrame* frame, WebContentDecryptionModule* initialCd
m) |
43 { | 43 { |
44 WebLocalFrameImpl* webFrame = WebLocalFrameImpl::fromFrame(frame); | 44 WebLocalFrameImpl* webFrame = WebLocalFrameImpl::fromFrame(frame); |
45 | 45 |
46 if (!webFrame || !webFrame->client()) | 46 if (!webFrame || !webFrame->client()) |
47 return nullptr; | 47 return nullptr; |
48 return adoptPtr(webFrame->client()->createMediaPlayer(webFrame, url, client,
initialCdm)); | 48 return adoptPtr(webFrame->client()->createMediaPlayer(webFrame, url, client,
client, initialCdm)); |
49 } | 49 } |
50 | 50 |
51 WebMediaPlayer* WebMediaPlayerClientImpl::webMediaPlayer() const | 51 WebMediaPlayer* WebMediaPlayerClientImpl::webMediaPlayer() const |
52 { | 52 { |
53 return m_webMediaPlayer.get(); | 53 return m_webMediaPlayer.get(); |
54 } | 54 } |
55 | 55 |
56 // WebMediaPlayerClient -------------------------------------------------------- | 56 // WebMediaPlayerClient -------------------------------------------------------- |
57 | 57 |
58 WebMediaPlayerClientImpl::~WebMediaPlayerClientImpl() | 58 WebMediaPlayerClientImpl::~WebMediaPlayerClientImpl() |
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
305 } | 305 } |
306 | 306 |
307 DEFINE_TRACE(WebMediaPlayerClientImpl::AudioClientImpl) | 307 DEFINE_TRACE(WebMediaPlayerClientImpl::AudioClientImpl) |
308 { | 308 { |
309 visitor->trace(m_client); | 309 visitor->trace(m_client); |
310 } | 310 } |
311 | 311 |
312 #endif | 312 #endif |
313 | 313 |
314 } // namespace blink | 314 } // namespace blink |
OLD | NEW |