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

Unified Diff: content/app/content_main_runner.cc

Issue 9316077: Enable audio/video tag in content_shell (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix content_unittests Created 8 years, 9 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
« no previous file with comments | « content/app/DEPS ('k') | content/browser/renderer_host/media/audio_renderer_host.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/app/content_main_runner.cc
diff --git a/content/app/content_main_runner.cc b/content/app/content_main_runner.cc
index 64a0dbb83e237c0f4ccdc1c22f0a26d89ee03a37..8d360c37ed1a76610e6a72a1f03cae845b914760 100644
--- a/content/app/content_main_runner.cc
+++ b/content/app/content_main_runner.cc
@@ -8,10 +8,12 @@
#include "base/command_line.h"
#include "base/debug/debugger.h"
#include "base/debug/trace_event.h"
+#include "base/file_path.h"
#include "base/i18n/icu_util.h"
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
#include "base/metrics/stats_table.h"
+#include "base/path_service.h"
#include "base/process_util.h"
#include "base/stringprintf.h"
#include "base/string_number_conversions.h"
@@ -27,6 +29,7 @@
#include "content/public/common/sandbox_init.h"
#include "crypto/nss_util.h"
#include "ipc/ipc_switches.h"
+#include "media/base/media.h"
#include "sandbox/src/sandbox_types.h"
#include "ui/base/ui_base_switches.h"
#include "ui/base/ui_base_paths.h"
@@ -197,7 +200,15 @@ int RunZygote(const content::MainFunctionParams& main_function_params,
};
scoped_ptr<content::ZygoteForkDelegate> zygote_fork_delegate;
- if (delegate) zygote_fork_delegate.reset(delegate->ZygoteStarting());
+ if (delegate) {
+ zygote_fork_delegate.reset(delegate->ZygoteStarting());
+ // Each Renderer we spawn will re-attempt initialization of the media
+ // libraries, at which point failure will be detected and handled, so
+ // we do not need to cope with initialization failures here.
+ FilePath media_path;
+ if (PathService::Get(content::DIR_MEDIA_LIBS, &media_path))
+ media::InitializeMediaLibrary(media_path);
+ }
// This function call can return multiple times, once per fork().
if (!ZygoteMain(main_function_params, zygote_fork_delegate.get()))
« no previous file with comments | « content/app/DEPS ('k') | content/browser/renderer_host/media/audio_renderer_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698