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

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

Issue 1690063002: Fix mime type mappings when the unified media pipeline is enabled. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Include MSE fixes. 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
« no previous file with comments | « no previous file | media/base/media.h » ('j') | media/base/mime_util.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 #include "content/renderer/stats_collection_controller.h" 126 #include "content/renderer/stats_collection_controller.h"
127 #include "content/renderer/usb/web_usb_client_impl.h" 127 #include "content/renderer/usb/web_usb_client_impl.h"
128 #include "content/renderer/wake_lock/wake_lock_dispatcher.h" 128 #include "content/renderer/wake_lock/wake_lock_dispatcher.h"
129 #include "content/renderer/web_frame_utils.h" 129 #include "content/renderer/web_frame_utils.h"
130 #include "content/renderer/web_ui_extension.h" 130 #include "content/renderer/web_ui_extension.h"
131 #include "content/renderer/websharedworker_proxy.h" 131 #include "content/renderer/websharedworker_proxy.h"
132 #include "crypto/sha2.h" 132 #include "crypto/sha2.h"
133 #include "gin/modules/module_registry.h" 133 #include "gin/modules/module_registry.h"
134 #include "media/audio/audio_output_device.h" 134 #include "media/audio/audio_output_device.h"
135 #include "media/base/audio_renderer_mixer_input.h" 135 #include "media/base/audio_renderer_mixer_input.h"
136 #include "media/base/media.h"
136 #include "media/base/media_log.h" 137 #include "media/base/media_log.h"
137 #include "media/base/media_switches.h" 138 #include "media/base/media_switches.h"
138 #include "media/blink/url_index.h" 139 #include "media/blink/url_index.h"
139 #include "media/blink/webencryptedmediaclient_impl.h" 140 #include "media/blink/webencryptedmediaclient_impl.h"
140 #include "media/blink/webmediaplayer_impl.h" 141 #include "media/blink/webmediaplayer_impl.h"
141 #include "media/renderers/gpu_video_accelerator_factories.h" 142 #include "media/renderers/gpu_video_accelerator_factories.h"
142 #include "mojo/common/url_type_converters.h" 143 #include "mojo/common/url_type_converters.h"
143 #include "mojo/edk/js/core.h" 144 #include "mojo/edk/js/core.h"
144 #include "mojo/edk/js/support.h" 145 #include "mojo/edk/js/support.h"
145 #include "net/base/data_url.h" 146 #include "net/base/data_url.h"
(...skipping 2344 matching lines...) Expand 10 before | Expand all | Expand 10 after
2490 render_thread->GetWorkerTaskRunner(), 2491 render_thread->GetWorkerTaskRunner(),
2491 render_thread->compositor_task_runner(), context_3d_cb, 2492 render_thread->compositor_task_runner(), context_3d_cb,
2492 base::Bind(&v8::Isolate::AdjustAmountOfExternalAllocatedMemory, 2493 base::Bind(&v8::Isolate::AdjustAmountOfExternalAllocatedMemory,
2493 base::Unretained(blink::mainThreadIsolate())), 2494 base::Unretained(blink::mainThreadIsolate())),
2494 GetMediaPermission(), initial_cdm); 2495 GetMediaPermission(), initial_cdm);
2495 2496
2496 #if defined(OS_ANDROID) 2497 #if defined(OS_ANDROID)
2497 if (!CanUseWebMediaPlayerImpl(load_type, url)) { 2498 if (!CanUseWebMediaPlayerImpl(load_type, url)) {
2498 return CreateAndroidWebMediaPlayer(client, encrypted_client, params); 2499 return CreateAndroidWebMediaPlayer(client, encrypted_client, params);
2499 } else if (!MustUseWebMediaPlayerImpl(load_type, url)) { 2500 } else if (!MustUseWebMediaPlayerImpl(load_type, url)) {
2500 // TODO(dalecurtis): This experiment is temporary and should be removed once 2501 if (media::IsUnifiedMediaPipelineEnabled())
ddorwin 2016/02/11 21:08:24 Is this logic backwards?
DaleCurtis 2016/02/11 22:04:53 Whoops, yes I dropped the ! while editing.
2501 // we have enough data to support the primacy of the unified media pipeline;
2502 // see http://crbug.com/533190 for details.
2503 //
2504 // Note: It's important to query the field trial state first, to ensure that
2505 // UMA reports the correct group.
2506 const std::string group_name =
2507 base::FieldTrialList::FindFullName("UnifiedMediaPipelineTrial");
2508 const bool enabled_via_cli =
2509 base::CommandLine::ForCurrentProcess()->HasSwitch(
2510 switches::kEnableUnifiedMediaPipeline);
2511 const bool enable_unified_media_pipeline =
2512 enabled_via_cli ||
2513 base::StartsWith(group_name, "Enabled", base::CompareCase::SENSITIVE);
2514
2515 if (!enable_unified_media_pipeline)
2516 return CreateAndroidWebMediaPlayer(client, encrypted_client, params); 2502 return CreateAndroidWebMediaPlayer(client, encrypted_client, params);
2517 } 2503 }
2518 #endif // defined(OS_ANDROID) 2504 #endif // defined(OS_ANDROID)
2519 2505
2520 #if defined(ENABLE_MOJO_MEDIA) && !defined(OS_ANDROID) 2506 #if defined(ENABLE_MOJO_MEDIA) && !defined(OS_ANDROID)
2521 scoped_ptr<media::RendererFactory> media_renderer_factory( 2507 scoped_ptr<media::RendererFactory> media_renderer_factory(
2522 new media::MojoRendererFactory(GetMediaServiceFactory())); 2508 new media::MojoRendererFactory(GetMediaServiceFactory()));
2523 #else 2509 #else
2524 scoped_ptr<media::RendererFactory> media_renderer_factory = 2510 scoped_ptr<media::RendererFactory> media_renderer_factory =
2525 GetContentClient()->renderer()->CreateMediaRendererFactory( 2511 GetContentClient()->renderer()->CreateMediaRendererFactory(
(...skipping 3605 matching lines...) Expand 10 before | Expand all | Expand 10 after
6131 int match_count, 6117 int match_count,
6132 int ordinal, 6118 int ordinal,
6133 const WebRect& selection_rect, 6119 const WebRect& selection_rect,
6134 bool final_status_update) { 6120 bool final_status_update) {
6135 Send(new FrameHostMsg_Find_Reply(routing_id_, request_id, match_count, 6121 Send(new FrameHostMsg_Find_Reply(routing_id_, request_id, match_count,
6136 selection_rect, ordinal, 6122 selection_rect, ordinal,
6137 final_status_update)); 6123 final_status_update));
6138 } 6124 }
6139 6125
6140 } // namespace content 6126 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | media/base/media.h » ('j') | media/base/mime_util.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698