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

Unified Diff: content/renderer/render_thread_impl.cc

Issue 9316077: Enable audio/video tag in content_shell (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add comment; PathServiceTest.Get test still fails on mac Created 8 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 side-by-side diff with in-line comments
Download patch
« content/app/content_main_runner.cc ('K') | « content/content_shell.gypi ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_thread_impl.cc
diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc
index 1f5216ed4f9533713f755b492b2e63b5a67affc2..4766b93ba32449c5d0be00f46256ec267c77263c 100644
--- a/content/renderer/render_thread_impl.cc
+++ b/content/renderer/render_thread_impl.cc
@@ -9,6 +9,7 @@
#include <map>
#include <vector>
+#include "base/base_paths.h"
#include "base/command_line.h"
#include "base/debug/trace_event.h"
#include "base/lazy_instance.h"
@@ -16,6 +17,7 @@
#include "base/metrics/field_trial.h"
#include "base/metrics/histogram.h"
#include "base/metrics/stats_table.h"
+#include "base/path_service.h"
#include "base/shared_memory.h"
#include "base/string_number_conversions.h" // Temporary
#include "base/threading/thread_local.h"
@@ -55,6 +57,7 @@
#include "grit/content_resources.h"
#include "ipc/ipc_channel_handle.h"
#include "ipc/ipc_platform_file.h"
+#include "media/base/media.h"
#include "net/base/net_errors.h"
#include "net/base/net_util.h"
#include "third_party/tcmalloc/chromium/src/google/malloc_extension.h"
@@ -225,6 +228,13 @@ void RenderThreadImpl::Init() {
content::GetContentClient()->renderer()->RenderThreadStarted();
+ // Note that under Linux, the media library will normally already have
+ // been initialized by the Zygote before this instance became a Renderer.
+ FilePath media_path;
+ PathService::Get(base::DIR_MEDIA_LIBS, &media_path);
+ if (!media_path.empty())
+ media::InitializeMediaLibrary(media_path);
+
TRACE_EVENT_END_ETW("RenderThreadImpl::Init", 0, "");
}
@@ -518,6 +528,9 @@ void RenderThreadImpl::EnsureWebKitInitialized() {
WebKit::WebRuntimeFeatures::enableMediaSource(
command_line.HasSwitch(switches::kEnableMediaSource));
+ WebRuntimeFeatures::enableMediaPlayer(
+ media::IsMediaLibraryInitialized());
+
WebKit::WebRuntimeFeatures::enableMediaStream(
command_line.HasSwitch(switches::kEnableMediaStream));
« content/app/content_main_runner.cc ('K') | « content/content_shell.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698