OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/media_player_renderer.h" | 5 #include "content/browser/media/android/media_player_renderer.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 | 8 |
9 #include "content/browser/media/android/media_resource_getter_impl.h" | 9 #include "content/browser/media/android/media_resource_getter_impl.h" |
10 #include "content/public/browser/browser_context.h" | 10 #include "content/public/browser/browser_context.h" |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 // TODO(tguilbert): Get the first party cookies from WMPI. See | 47 // TODO(tguilbert): Get the first party cookies from WMPI. See |
48 // crbug.com/636604. | 48 // crbug.com/636604. |
49 media_player_.reset(new media::MediaPlayerBridge( | 49 media_player_.reset(new media::MediaPlayerBridge( |
50 kUnusedAndIrrelevantPlayerId, url, | 50 kUnusedAndIrrelevantPlayerId, url, |
51 GURL(), // first_party_for_cookies | 51 GURL(), // first_party_for_cookies |
52 user_agent, | 52 user_agent, |
53 false, // hide_url_log | 53 false, // hide_url_log |
54 this, base::Bind(&MediaPlayerRenderer::OnDecoderResourcesReleased, | 54 this, base::Bind(&MediaPlayerRenderer::OnDecoderResourcesReleased, |
55 weak_factory_.GetWeakPtr()), | 55 weak_factory_.GetWeakPtr()), |
56 GURL(), // frame_url | 56 GURL(), // frame_url |
57 false, // allow_crendentials | 57 false)); // allow_crendentials |
58 0)); // media_session_id | |
59 | 58 |
60 // TODO(tguilbert): Register and Send the proper surface ID. See | 59 // TODO(tguilbert): Register and Send the proper surface ID. See |
61 // crbug.com/627658 | 60 // crbug.com/627658 |
62 | 61 |
63 media_player_->Initialize(); | 62 media_player_->Initialize(); |
64 init_cb.Run(media::PIPELINE_OK); | 63 init_cb.Run(media::PIPELINE_OK); |
65 } | 64 } |
66 | 65 |
67 void MediaPlayerRenderer::SetCdm(media::CdmContext* cdm_context, | 66 void MediaPlayerRenderer::SetCdm(media::CdmContext* cdm_context, |
68 const media::CdmAttachedCB& cdm_attached_cb) { | 67 const media::CdmAttachedCB& cdm_attached_cb) { |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
219 | 218 |
220 void MediaPlayerRenderer::OnDecoderResourcesReleased(int player_id) { | 219 void MediaPlayerRenderer::OnDecoderResourcesReleased(int player_id) { |
221 // Since we are not using a pool of MediaPlayerAndroid instances, this | 220 // Since we are not using a pool of MediaPlayerAndroid instances, this |
222 // function is not relevant. | 221 // function is not relevant. |
223 | 222 |
224 // TODO(tguilbert): Throttle requests, via exponential backoff. | 223 // TODO(tguilbert): Throttle requests, via exponential backoff. |
225 // See crbug.com/636615. | 224 // See crbug.com/636615. |
226 } | 225 } |
227 | 226 |
228 } // namespace content | 227 } // namespace content |
OLD | NEW |