summaryrefslogtreecommitdiffstats
path: root/chrome/app
diff options
context:
space:
mode:
authorshess@chromium.org <shess@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-27 01:16:03 +0000
committershess@chromium.org <shess@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-27 01:16:03 +0000
commitdb8562c14d6d8e09cc8453eb9e9b9b7cdf6d11b0 (patch)
treeab6f88d7a4b4c6838cbb56db4f95eabb13649a88 /chrome/app
parent2c4f5143cffe615185e9de9c81ea748ce82e6777 (diff)
downloadchromium_src-db8562c14d6d8e09cc8453eb9e9b9b7cdf6d11b0.zip
chromium_src-db8562c14d6d8e09cc8453eb9e9b9b7cdf6d11b0.tar.gz
chromium_src-db8562c14d6d8e09cc8453eb9e9b9b7cdf6d11b0.tar.bz2
Enable --single-process for Mac and Linux.
Additionally, wire in a bit of setup for the --single-process case, because it cannot be done by the renderer thread because that thread is not the main thread. Fair warning: --single-process often seems to be broken by various unrelated changes, which may-or-may-not make assumptions about the process architecture. I will try to stay on top of these. Review URL: http://codereview.chromium.org/21330 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10559 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/app')
-rw-r--r--chrome/app/chrome_dll_main.cc16
1 files changed, 12 insertions, 4 deletions
diff --git a/chrome/app/chrome_dll_main.cc b/chrome/app/chrome_dll_main.cc
index daf5244..265f5f7 100644
--- a/chrome/app/chrome_dll_main.cc
+++ b/chrome/app/chrome_dll_main.cc
@@ -32,9 +32,9 @@
#include "base/string_util.h"
#if defined(OS_WIN)
#include "base/win_util.h"
-#include "chrome/browser/renderer_host/render_process_host.h"
#endif
#include "chrome/app/scoped_ole_initializer.h"
+#include "chrome/browser/renderer_host/render_process_host.h"
#include "chrome/common/chrome_constants.h"
#include "chrome/common/chrome_counters.h"
#include "chrome/common/chrome_paths.h"
@@ -47,6 +47,9 @@
#include "sandbox/src/sandbox.h"
#include "tools/memory_watcher/memory_watcher.h"
#endif
+#if defined(OS_MACOSX)
+#include "third_party/WebKit/WebKit/mac/WebCoreSupport/WebSystemInterface.h"
+#endif
extern int BrowserMain(const MainFunctionParams&);
extern int RendererMain(const MainFunctionParams&);
@@ -275,13 +278,18 @@ int ChromeMain(int argc, const char** argv) {
if (!user_data_dir.empty())
PathService::Override(chrome::DIR_USER_DATA, user_data_dir);
-#if defined(OS_WIN)
- // TODO(port): pull in when render_process_host.h compiles on posix. There's
- // nothing win-specific about these lines.
bool single_process =
parsed_command_line.HasSwitch(switches::kSingleProcess);
if (single_process)
RenderProcessHost::set_run_renderer_in_process(true);
+#if defined(OS_MACOSX)
+ // TODO(port-mac): This is from renderer_main_platform_delegate.cc.
+ // shess tried to refactor things appropriately, but it sprawled out
+ // of control because different platforms needed different styles of
+ // initialization. Try again once we understand the process
+ // architecture needed and where it should live.
+ if (single_process)
+ InitWebCoreSystemInterface();
#endif
bool icu_result = icu_util::Initialize();