diff options
-rw-r--r-- | chrome/app/chrome_dll_main.cc | 3 | ||||
-rw-r--r-- | chrome/renderer/renderer.scons | 7 | ||||
-rw-r--r-- | chrome/renderer/renderer_main.cc | 14 | ||||
-rw-r--r-- | chrome/renderer/renderer_main_platform_delegate_linux.cc | 37 |
4 files changed, 50 insertions, 11 deletions
diff --git a/chrome/app/chrome_dll_main.cc b/chrome/app/chrome_dll_main.cc index f14b886..f4b4bb4e 100644 --- a/chrome/app/chrome_dll_main.cc +++ b/chrome/app/chrome_dll_main.cc @@ -312,10 +312,7 @@ int ChromeMain(int argc, const char** argv) { // TODO(port): turn on these main() functions as they've been de-winified. int rv = -1; if (process_type == switches::kRendererProcess) { - // TODO(port) turn this on and follow the link chain... -#if !defined(OS_LINUX) rv = RendererMain(main_params); -#endif } else if (process_type == switches::kPluginProcess) { #if defined(OS_WIN) rv = PluginMain(main_params); diff --git a/chrome/renderer/renderer.scons b/chrome/renderer/renderer.scons index 99d99e3..4f5ba60 100644 --- a/chrome/renderer/renderer.scons +++ b/chrome/renderer/renderer.scons @@ -96,8 +96,13 @@ if not env.Bit('windows'): '$CHROME_DIR/tools/build/win/precompiled_wtl.h', ) -# TODO(port): Port these to Linux if env.Bit('linux'): + # Linux-specific. + input_files.Append( + 'renderer_main_platform_delegate_linux.cc', + ) + + # TODO(port): Port these to Linux input_files.Remove( 'chrome_plugin_host.cc', 'plugin_channel_host.cc', diff --git a/chrome/renderer/renderer_main.cc b/chrome/renderer/renderer_main.cc index 96d02ec..13016f1 100644 --- a/chrome/renderer/renderer_main.cc +++ b/chrome/renderer/renderer_main.cc @@ -48,12 +48,12 @@ static void HandleRendererErrorTestParameters(const CommandLine& command_line) { MB_OK | MB_SETFOREGROUND); #elif defined(OS_LINUX) // TODO(port): create an abstraction layer for dialog boxes and use it here. - GtkDialog *dialog = - GTK_DIALOG(gtk_dialog_new_with_buttons("renderer starting...", - NULL, static_cast<GtkDialogFlags>(GTK_DIALOG_MODAL | - GTK_DIALOG_DESTROY_WITH_PARENT), - GTK_STOCK_OK)); - gtk_dialog_run(dialog); + std::string text = StringPrintf("attach to me at pid %d", getpid()); + GtkWidget* dialog = gtk_message_dialog_new( + NULL, GTK_DIALOG_MODAL, GTK_MESSAGE_INFO, GTK_BUTTONS_OK, text.c_str()); + gtk_window_set_title(GTK_WINDOW(dialog), "renderer starting..."); + gtk_dialog_run(GTK_DIALOG(dialog)); // Runs a nested message loop. + gtk_widget_destroy(dialog); #elif defined(OS_MACOSX) // TODO(playmobil): In the long term, overriding this flag doesn't seem // right, either use our own flag or open a dialog we can use. @@ -62,7 +62,7 @@ static void HandleRendererErrorTestParameters(const CommandLine& command_line) { << getpid() << ") paused waiting for debugger to attach @ pid"; pause(); -#endif // defined(OS_POSIX) +#endif // defined(OS_MACOSX) } } diff --git a/chrome/renderer/renderer_main_platform_delegate_linux.cc b/chrome/renderer/renderer_main_platform_delegate_linux.cc new file mode 100644 index 0000000..9ba5ff8 --- /dev/null +++ b/chrome/renderer/renderer_main_platform_delegate_linux.cc @@ -0,0 +1,37 @@ +// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "chrome/renderer/renderer_main_platform_delegate.h" + +#include "base/debug_util.h" + +// This is a no op class because we do not have a sandbox on linux. + +RendererMainPlatformDelegate::RendererMainPlatformDelegate( + const MainFunctionParams& parameters) + : parameters_(parameters) { +} + +RendererMainPlatformDelegate::~RendererMainPlatformDelegate() { +} + +void RendererMainPlatformDelegate::PlatformInitialize() { +} + +void RendererMainPlatformDelegate::PlatformUninitialize() { +} + +bool RendererMainPlatformDelegate::InitSandboxTests(bool no_sandbox) { + NOTIMPLEMENTED(); + return true; +} + +bool RendererMainPlatformDelegate::EnableSandbox() { + NOTIMPLEMENTED(); + return true; +} + +void RendererMainPlatformDelegate::RunSandboxTests() { + NOTIMPLEMENTED(); +} |