summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xchrome/chrome.gyp56
-rw-r--r--chrome/renderer/render_process.cc12
2 files changed, 45 insertions, 23 deletions
diff --git a/chrome/chrome.gyp b/chrome/chrome.gyp
index 3b6c302..6ee262e 100755
--- a/chrome/chrome.gyp
+++ b/chrome/chrome.gyp
@@ -3386,34 +3386,11 @@
'app/theme/google_chrome/app.icns',
'app/theme/google_chrome/document.icns',
],
- 'copies': [
- {
- 'destination': '<(PRODUCT_DIR)/<(mac_product_name).app/Contents/MacOS',
- # TODO(ajwong): This, and the parallel chromium stanza below
- # really should find a way to share file paths with
- # ffmpeg.gyp so they don't diverge. (BUG=23602)
- 'files': [
- '../third_party/ffmpeg/binaries/chrome/mac/ia32/libavcodec.52.dylib',
- '../third_party/ffmpeg/binaries/chrome/mac/ia32/libavformat.52.dylib',
- '../third_party/ffmpeg/binaries/chrome/mac/ia32/libavutil.50.dylib',
- ],
- },
- ],
}, { # else: 'branding!="Chrome"
'mac_bundle_resources': [
'app/theme/chromium/app.icns',
'app/theme/chromium/document.icns',
],
- 'copies': [
- {
- 'destination': '<(PRODUCT_DIR)/<(mac_product_name).app/Contents/MacOS',
- 'files': [
- '../third_party/ffmpeg/binaries/chromium/mac/ia32/libavcodec.52.dylib',
- '../third_party/ffmpeg/binaries/chromium/mac/ia32/libavformat.52.dylib',
- '../third_party/ffmpeg/binaries/chromium/mac/ia32/libavutil.50.dylib',
- ],
- },
- ],
}],
['mac_breakpad==1', {
'variables': {
@@ -5139,6 +5116,13 @@
'postbuild_name': 'Tweak Mac lproj folders',
'action': ['app/tweak_mac_lproj_folders'],
},
+ {
+ 'postbuild_name': 'Symlink Libraries',
+ 'action': ['ln',
+ '-fhs',
+ 'Versions/Current/Libraries',
+ '${BUILT_PRODUCTS_DIR}/${WRAPPER_NAME}/Libraries'],
+ },
],
'copies': [
{
@@ -5176,6 +5160,32 @@
'app/breakpad_mac.h',
],
}], # mac_breakpad
+ ['branding=="Chrome"', {
+ 'copies': [
+ {
+ 'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Libraries',
+ # TODO(ajwong): This, and the parallel chromium stanza
+ # below really should find a way to share file paths with
+ # ffmpeg.gyp so they don't diverge. (BUG=23602)
+ 'files': [
+ '../third_party/ffmpeg/binaries/chrome/mac/ia32/libavcodec.52.dylib',
+ '../third_party/ffmpeg/binaries/chrome/mac/ia32/libavformat.52.dylib',
+ '../third_party/ffmpeg/binaries/chrome/mac/ia32/libavutil.50.dylib',
+ ],
+ },
+ ],
+ }, { # else: 'branding!="Chrome"
+ 'copies': [
+ {
+ 'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Libraries',
+ 'files': [
+ '../third_party/ffmpeg/binaries/chromium/mac/ia32/libavcodec.52.dylib',
+ '../third_party/ffmpeg/binaries/chromium/mac/ia32/libavformat.52.dylib',
+ '../third_party/ffmpeg/binaries/chromium/mac/ia32/libavutil.50.dylib',
+ ],
+ },
+ ],
+ }], # branding
], # conditions
}], # OS=="mac"
], # conditions
diff --git a/chrome/renderer/render_process.cc b/chrome/renderer/render_process.cc
index 6992a67..8dc9264 100644
--- a/chrome/renderer/render_process.cc
+++ b/chrome/renderer/render_process.cc
@@ -34,6 +34,10 @@
#include "native_client/src/trusted/plugin/nacl_entry_points.h"
#include "webkit/glue/webkit_glue.h"
+#if defined(OS_MACOSX)
+#include "base/mac_util.h"
+#endif
+
//-----------------------------------------------------------------------------
RenderProcess::RenderProcess()
@@ -91,10 +95,18 @@ RenderProcess::RenderProcess()
webkit_glue::SetMediaCacheEnabled(true);
}
+#if defined(OS_MACOSX)
+ FilePath bundle_path = mac_util::MainAppBundlePath();
+
+ initialized_media_library_ =
+ media::InitializeMediaLibrary(bundle_path.Append("Libraries"));
+
+#else
FilePath module_path;
initialized_media_library_ =
PathService::Get(base::DIR_MODULE, &module_path) &&
media::InitializeMediaLibrary(module_path);
+#endif
}
RenderProcess::~RenderProcess() {