OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "content/browser/media/android/browser_media_player_manager.h" | 5 #include "content/browser/media/android/browser_media_player_manager.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/android/scoped_java_ref.h" | 9 #include "base/android/scoped_java_ref.h" |
10 #include "content/browser/frame_host/render_frame_host_impl.h" | 10 #include "content/browser/frame_host/render_frame_host_impl.h" |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 ContentViewCore* BrowserMediaPlayerManager::GetContentViewCore() const { | 136 ContentViewCore* BrowserMediaPlayerManager::GetContentViewCore() const { |
137 return ContentViewCoreImpl::FromWebContents(web_contents()); | 137 return ContentViewCoreImpl::FromWebContents(web_contents()); |
138 } | 138 } |
139 #endif | 139 #endif |
140 | 140 |
141 MediaPlayerAndroid* BrowserMediaPlayerManager::CreateMediaPlayer( | 141 MediaPlayerAndroid* BrowserMediaPlayerManager::CreateMediaPlayer( |
142 const MediaPlayerHostMsg_Initialize_Params& media_player_params, | 142 const MediaPlayerHostMsg_Initialize_Params& media_player_params, |
143 bool hide_url_log, | 143 bool hide_url_log, |
144 BrowserDemuxerAndroid* demuxer) { | 144 BrowserDemuxerAndroid* demuxer) { |
145 switch (media_player_params.type) { | 145 switch (media_player_params.type) { |
| 146 case MEDIA_PLAYER_TYPE_REMOTE_ONLY: |
| 147 return nullptr; |
| 148 |
146 case MEDIA_PLAYER_TYPE_URL: { | 149 case MEDIA_PLAYER_TYPE_URL: { |
147 const std::string user_agent = GetContentClient()->GetUserAgent(); | 150 const std::string user_agent = GetContentClient()->GetUserAgent(); |
148 MediaPlayerBridge* media_player_bridge = new MediaPlayerBridge( | 151 MediaPlayerBridge* media_player_bridge = new MediaPlayerBridge( |
149 media_player_params.player_id, | 152 media_player_params.player_id, |
150 media_player_params.url, | 153 media_player_params.url, |
151 media_player_params.first_party_for_cookies, | 154 media_player_params.first_party_for_cookies, |
152 user_agent, | 155 user_agent, |
153 hide_url_log, | 156 hide_url_log, |
154 this, | 157 this, |
155 base::Bind(&BrowserMediaPlayerManager::OnDecoderResourcesReleased, | 158 base::Bind(&BrowserMediaPlayerManager::OnDecoderResourcesReleased, |
(...skipping 610 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
766 if (!player) | 769 if (!player) |
767 return; | 770 return; |
768 player->Start(); | 771 player->Start(); |
769 if (fullscreen_player_id_ == player_id && fullscreen_player_is_released_) { | 772 if (fullscreen_player_id_ == player_id && fullscreen_player_is_released_) { |
770 video_view_->OpenVideo(); | 773 video_view_->OpenVideo(); |
771 fullscreen_player_is_released_ = false; | 774 fullscreen_player_is_released_ = false; |
772 } | 775 } |
773 } | 776 } |
774 | 777 |
775 } // namespace content | 778 } // namespace content |
OLD | NEW |