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

Side by Side Diff: content/renderer/render_frame_impl.cc

Issue 1712903002: Remove prefixed EME. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix layout tests. Created 4 years, 10 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 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/renderer/render_frame_impl.h" 5 #include "content/renderer/render_frame_impl.h"
6 6
7 #include <map> 7 #include <map>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 2478 matching lines...) Expand 10 before | Expand all | Expand 10 after
2489 media::WebMediaPlayerParams params( 2489 media::WebMediaPlayerParams params(
2490 base::Bind(&ContentRendererClient::DeferMediaLoad, 2490 base::Bind(&ContentRendererClient::DeferMediaLoad,
2491 base::Unretained(GetContentClient()->renderer()), 2491 base::Unretained(GetContentClient()->renderer()),
2492 static_cast<RenderFrame*>(this), 2492 static_cast<RenderFrame*>(this),
2493 GetWebMediaPlayerDelegate()->has_played_media()), 2493 GetWebMediaPlayerDelegate()->has_played_media()),
2494 audio_renderer_sink, media_log, render_thread->GetMediaThreadTaskRunner(), 2494 audio_renderer_sink, media_log, render_thread->GetMediaThreadTaskRunner(),
2495 render_thread->GetWorkerTaskRunner(), 2495 render_thread->GetWorkerTaskRunner(),
2496 render_thread->compositor_task_runner(), context_3d_cb, 2496 render_thread->compositor_task_runner(), context_3d_cb,
2497 base::Bind(&v8::Isolate::AdjustAmountOfExternalAllocatedMemory, 2497 base::Bind(&v8::Isolate::AdjustAmountOfExternalAllocatedMemory,
2498 base::Unretained(blink::mainThreadIsolate())), 2498 base::Unretained(blink::mainThreadIsolate())),
2499 GetMediaPermission(), initial_cdm, media_surface_manager_); 2499 initial_cdm, media_surface_manager_);
2500 2500
2501 #if defined(OS_ANDROID) 2501 #if defined(OS_ANDROID)
2502 if (!CanUseWebMediaPlayerImpl(load_type, url)) { 2502 if (!CanUseWebMediaPlayerImpl(load_type, url)) {
2503 return CreateAndroidWebMediaPlayer(client, encrypted_client, params); 2503 return CreateAndroidWebMediaPlayer(client, encrypted_client, params);
2504 } else if (!MustUseWebMediaPlayerImpl(load_type, url)) { 2504 } else if (!MustUseWebMediaPlayerImpl(load_type, url)) {
2505 // TODO(dalecurtis): This experiment is temporary and should be removed once 2505 // TODO(dalecurtis): This experiment is temporary and should be removed once
2506 // we have enough data to support the primacy of the unified media pipeline; 2506 // we have enough data to support the primacy of the unified media pipeline;
2507 // see http://crbug.com/533190 for details. 2507 // see http://crbug.com/533190 for details.
2508 // 2508 //
2509 // Note: It's important to query the field trial state first, to ensure that 2509 // Note: It's important to query the field trial state first, to ensure that
(...skipping 26 matching lines...) Expand all
2536 *render_thread->GetAudioHardwareConfig())); 2536 *render_thread->GetAudioHardwareConfig()));
2537 } 2537 }
2538 #endif // defined(ENABLE_MOJO_MEDIA) && !defined(OS_ANDROID) 2538 #endif // defined(ENABLE_MOJO_MEDIA) && !defined(OS_ANDROID)
2539 2539
2540 if (!url_index_.get() || url_index_->frame() != frame_) 2540 if (!url_index_.get() || url_index_->frame() != frame_)
2541 url_index_.reset(new media::UrlIndex(frame_)); 2541 url_index_.reset(new media::UrlIndex(frame_));
2542 2542
2543 media::WebMediaPlayerImpl* media_player = new media::WebMediaPlayerImpl( 2543 media::WebMediaPlayerImpl* media_player = new media::WebMediaPlayerImpl(
2544 frame_, client, encrypted_client, 2544 frame_, client, encrypted_client,
2545 GetWebMediaPlayerDelegate()->AsWeakPtr(), 2545 GetWebMediaPlayerDelegate()->AsWeakPtr(),
2546 std::move(media_renderer_factory), GetCdmFactory(), url_index_, params); 2546 std::move(media_renderer_factory), url_index_, params);
2547 2547
2548 #if defined(OS_ANDROID) // WMPI_CAST 2548 #if defined(OS_ANDROID) // WMPI_CAST
2549 media_player->SetMediaPlayerManager(GetMediaPlayerManager()); 2549 media_player->SetMediaPlayerManager(GetMediaPlayerManager());
2550 media_player->SetDeviceScaleFactor(render_view_->GetDeviceScaleFactor()); 2550 media_player->SetDeviceScaleFactor(render_view_->GetDeviceScaleFactor());
2551 #endif 2551 #endif
2552 2552
2553 return media_player; 2553 return media_player;
2554 } 2554 }
2555 2555
2556 blink::WebMediaSession* RenderFrameImpl::createMediaSession() { 2556 blink::WebMediaSession* RenderFrameImpl::createMediaSession() {
(...skipping 3380 matching lines...) Expand 10 before | Expand all | Expand 10 after
5937 RenderThreadImpl::current()->GetStreamTexureFactory(); 5937 RenderThreadImpl::current()->GetStreamTexureFactory();
5938 if (!stream_texture_factory.get()) { 5938 if (!stream_texture_factory.get()) {
5939 LOG(ERROR) << "Failed to get stream texture factory!"; 5939 LOG(ERROR) << "Failed to get stream texture factory!";
5940 return NULL; 5940 return NULL;
5941 } 5941 }
5942 5942
5943 bool enable_texture_copy = 5943 bool enable_texture_copy =
5944 RenderThreadImpl::current()->EnableStreamTextureCopy(); 5944 RenderThreadImpl::current()->EnableStreamTextureCopy();
5945 return new WebMediaPlayerAndroid(frame_, client, encrypted_client, 5945 return new WebMediaPlayerAndroid(frame_, client, encrypted_client,
5946 GetWebMediaPlayerDelegate()->AsWeakPtr(), 5946 GetWebMediaPlayerDelegate()->AsWeakPtr(),
5947 GetMediaPlayerManager(), GetCdmFactory(), 5947 GetMediaPlayerManager(),
5948 stream_texture_factory, routing_id_, 5948 stream_texture_factory, routing_id_,
5949 enable_texture_copy, params); 5949 enable_texture_copy, params);
5950 } 5950 }
5951 5951
5952 RendererMediaPlayerManager* RenderFrameImpl::GetMediaPlayerManager() { 5952 RendererMediaPlayerManager* RenderFrameImpl::GetMediaPlayerManager() {
5953 if (!media_player_manager_) 5953 if (!media_player_manager_)
5954 media_player_manager_ = new RendererMediaPlayerManager(this); 5954 media_player_manager_ = new RendererMediaPlayerManager(this);
5955 return media_player_manager_; 5955 return media_player_manager_;
5956 } 5956 }
5957 5957
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
6098 int match_count, 6098 int match_count,
6099 int ordinal, 6099 int ordinal,
6100 const WebRect& selection_rect, 6100 const WebRect& selection_rect,
6101 bool final_status_update) { 6101 bool final_status_update) {
6102 Send(new FrameHostMsg_Find_Reply(routing_id_, request_id, match_count, 6102 Send(new FrameHostMsg_Find_Reply(routing_id_, request_id, match_count,
6103 selection_rect, ordinal, 6103 selection_rect, ordinal,
6104 final_status_update)); 6104 final_status_update));
6105 } 6105 }
6106 6106
6107 } // namespace content 6107 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698