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

Unified Diff: chrome/browser/plugin_process_host.cc

Issue 164100: Set up a interposing library for Carbon calls made by plugins. (Closed)
Patch Set: Review comments and files that were lost in the move Created 11 years, 4 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 | « chrome/browser/plugin_carbon_interpose_mac.cc ('k') | chrome/chrome.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/plugin_process_host.cc
diff --git a/chrome/browser/plugin_process_host.cc b/chrome/browser/plugin_process_host.cc
index d57daaec151fa74ba7f9fca44f85acd0ff0347f9..3c5f169705de5e2c96c37f794953968954f6e43f 100644
--- a/chrome/browser/plugin_process_host.cc
+++ b/chrome/browser/plugin_process_host.cc
@@ -64,6 +64,10 @@
#include "base/gfx/gtk_native_view_id_manager.h"
#endif
+#if defined(OS_MACOSX)
+#include "chrome/common/plugin_carbon_interpose_constants_mac.h"
+#endif
+
static const char kDefaultPluginFinderURL[] =
"http://dl.google.com/chrome/plugins/plugins2.xml";
@@ -410,7 +414,22 @@ bool PluginProcessHost::Init(const WebPluginInfo& info,
if (ipcfd > -1)
fds_to_map.push_back(std::pair<int, int>(
ipcfd, kPrimaryIPCChannel + base::GlobalDescriptors::kBaseDescriptor));
- base::LaunchApp(cmd_line.argv(), fds_to_map, false, &process);
+ base::environment_vector env;
+#if defined(OS_MACOSX)
+ // Add our interposing library for Carbon. This is stripped back out in
+ // plugin_main.cc, so changes here should be reflected there.
+ std::string interpose_list(plugin_interpose_strings::kInterposeLibraryPath);
+ const char* existing_list =
+ getenv(plugin_interpose_strings::kDYLDInsertLibrariesKey);
+ if (existing_list) {
+ interpose_list.insert(0, ":");
+ interpose_list.insert(0, existing_list);
+ }
+ env.push_back(std::pair<const char*, const char*>(
+ plugin_interpose_strings::kDYLDInsertLibrariesKey,
+ interpose_list.c_str()));
+#endif
+ base::LaunchApp(cmd_line.argv(), env, fds_to_map, false, &process);
#endif
if (!process)
« no previous file with comments | « chrome/browser/plugin_carbon_interpose_mac.cc ('k') | chrome/chrome.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698