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

Side by Side Diff: content/browser/android/media_player_manager_impl.cc

Issue 14247018: Implement WebRTC in Chrome for TV (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: build fix Created 7 years, 6 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 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/android/media_player_manager_impl.h" 5 #include "content/browser/android/media_player_manager_impl.h"
6 6
7 #include "content/browser/android/media_resource_getter_impl.h" 7 #include "content/browser/android/media_resource_getter_impl.h"
8 #include "content/browser/web_contents/web_contents_view_android.h" 8 #include "content/browser/web_contents/web_contents_view_android.h"
9 #include "content/common/media/media_player_messages_android.h" 9 #include "content/common/media/media_player_messages_android.h"
10 #include "content/public/browser/browser_context.h" 10 #include "content/public/browser/browser_context.h"
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 void MediaPlayerManagerImpl::SetVideoSurface(gfx::ScopedJavaSurface surface) { 119 void MediaPlayerManagerImpl::SetVideoSurface(gfx::ScopedJavaSurface surface) {
120 MediaPlayerAndroid* player = GetFullscreenPlayer(); 120 MediaPlayerAndroid* player = GetFullscreenPlayer();
121 if (player) { 121 if (player) {
122 player->SetVideoSurface(surface.Pass()); 122 player->SetVideoSurface(surface.Pass());
123 Send(new MediaPlayerMsg_DidEnterFullscreen( 123 Send(new MediaPlayerMsg_DidEnterFullscreen(
124 routing_id(), player->player_id())); 124 routing_id(), player->player_id()));
125 } 125 }
126 } 126 }
127 127
128 void MediaPlayerManagerImpl::OnInitialize( 128 void MediaPlayerManagerImpl::OnInitialize(
129 int player_id, const GURL& url, 129 int player_id,
130 bool is_media_source, 130 const GURL& url,
131 media::MediaPlayerAndroid::SourceType source_type,
131 const GURL& first_party_for_cookies) { 132 const GURL& first_party_for_cookies) {
132 RemovePlayer(player_id); 133 RemovePlayer(player_id);
133 134
134 RenderProcessHost* host = render_view_host()->GetProcess(); 135 RenderProcessHost* host = render_view_host()->GetProcess();
135 AddPlayer(media::MediaPlayerAndroid::Create( 136 AddPlayer(media::MediaPlayerAndroid::Create(
136 player_id, url, is_media_source, first_party_for_cookies, 137 player_id, url, source_type, first_party_for_cookies,
137 host->GetBrowserContext()->IsOffTheRecord(), this)); 138 host->GetBrowserContext()->IsOffTheRecord(), this));
138 } 139 }
139 140
140 media::MediaResourceGetter* MediaPlayerManagerImpl::GetMediaResourceGetter() { 141 media::MediaResourceGetter* MediaPlayerManagerImpl::GetMediaResourceGetter() {
141 if (!media_resource_getter_.get()) { 142 if (!media_resource_getter_.get()) {
142 RenderProcessHost* host = render_view_host()->GetProcess(); 143 RenderProcessHost* host = render_view_host()->GetProcess();
143 BrowserContext* context = host->GetBrowserContext(); 144 BrowserContext* context = host->GetBrowserContext();
144 StoragePartition* partition = host->GetStoragePartition(); 145 StoragePartition* partition = host->GetStoragePartition();
145 fileapi::FileSystemContext* file_system_context = 146 fileapi::FileSystemContext* file_system_context =
146 partition ? partition->GetFileSystemContext() : NULL; 147 partition ? partition->GetFileSystemContext() : NULL;
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
390 for (ScopedVector<MediaPlayerAndroid>::iterator it = players_.begin(); 391 for (ScopedVector<MediaPlayerAndroid>::iterator it = players_.begin();
391 it != players_.end(); ++it) { 392 it != players_.end(); ++it) {
392 if ((*it)->player_id() == player_id) { 393 if ((*it)->player_id() == player_id) {
393 players_.erase(it); 394 players_.erase(it);
394 break; 395 break;
395 } 396 }
396 } 397 }
397 } 398 }
398 399
399 } // namespace content 400 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/android/media_player_manager_impl.h ('k') | content/common/media/media_player_messages_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698