diff options
author | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-09 16:53:55 +0000 |
---|---|---|
committer | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-09 16:53:55 +0000 |
commit | 45d1a8d3953c8c800e3c1e9b7476844c13e040d2 (patch) | |
tree | 34a273617d9c84dc261d0b26a29a09b64f3abcfd /chrome/renderer/renderer_main.cc | |
parent | 3941c026ba6576a4e21c93f3f08b917505c369a1 (diff) | |
download | chromium_src-45d1a8d3953c8c800e3c1e9b7476844c13e040d2.zip chromium_src-45d1a8d3953c8c800e3c1e9b7476844c13e040d2.tar.gz chromium_src-45d1a8d3953c8c800e3c1e9b7476844c13e040d2.tar.bz2 |
Create a dialog box on Linux for --renderer-startup-dialog
Review URL: http://codereview.chromium.org/23012
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9389 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/renderer_main.cc')
-rw-r--r-- | chrome/renderer/renderer_main.cc | 28 |
1 files changed, 20 insertions, 8 deletions
diff --git a/chrome/renderer/renderer_main.cc b/chrome/renderer/renderer_main.cc index 561a9ef..96d02ec 100644 --- a/chrome/renderer/renderer_main.cc +++ b/chrome/renderer/renderer_main.cc @@ -19,6 +19,10 @@ #include "chrome/renderer/renderer_main_platform_delegate.h" #include "chrome/renderer/render_process.h" +#if defined(OS_LINUX) +#include <gtk/gtk.h> +#endif + #include "chromium_strings.h" #include "generated_resources.h" @@ -42,14 +46,22 @@ static void HandleRendererErrorTestParameters(const CommandLine& command_line) { title += L" renderer"; // makes attaching to process easier ::MessageBox(NULL, L"renderer starting...", title.c_str(), MB_OK | MB_SETFOREGROUND); -#elif defined(OS_POSIX) - // 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. - // This is just to ease debugging in the interim. - LOG(WARNING) << "Renderer (" - << getpid() - << ") paused waiting for debugger to attach @ pid" ; - pause(); +#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); +#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. + // This is just to ease debugging in the interim. + LOG(WARNING) << "Renderer (" + << getpid() + << ") paused waiting for debugger to attach @ pid"; + pause(); #endif // defined(OS_POSIX) } } |