From 583335e29fb77b9a18f43c6804b8bfcd1b3f1d52 Mon Sep 17 00:00:00 2001 From: "evan@chromium.org" Date: Fri, 5 Nov 2010 20:40:29 +0000 Subject: Revert "gtk: refactor copy-pasted code" Build break. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65247 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/gpu/gpu_thread.cc | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'chrome/gpu') diff --git a/chrome/gpu/gpu_thread.cc b/chrome/gpu/gpu_thread.cc index 85aea62..8c1059f 100644 --- a/chrome/gpu/gpu_thread.cc +++ b/chrome/gpu/gpu_thread.cc @@ -15,7 +15,6 @@ #include "chrome/common/gpu_info.h" #include "chrome/common/gpu_messages.h" #include "chrome/gpu/gpu_info_collector.h" -#include "gfx/gtk_util.h" #include "ipc/ipc_channel_handle.h" #if defined(OS_WIN) @@ -44,7 +43,22 @@ GpuThread::GpuThread() { // rethink whether initializing Gtk is really necessary or whether we // should just send the display connection down to the GPUProcessor. g_thread_init(NULL); - gfx::GtkInitFromCommandLine(*CommandLine::ForCurrentProcess()); + const std::vector& args = + CommandLine::ForCurrentProcess()->argv(); + int argc = args.size(); + scoped_array argv(new char *[argc + 1]); + for (size_t i = 0; i < args.size(); ++i) { + // TODO(piman@google.com): can gtk_init modify argv? Just being safe + // here. + argv[i] = strdup(args[i].c_str()); + } + argv[argc] = NULL; + char **argv_pointer = argv.get(); + + gtk_init(&argc, &argv_pointer); + for (size_t i = 0; i < args.size(); ++i) { + free(argv[i]); + } x11_util::SetDefaultX11ErrorHandlers(); } #endif -- cgit v1.1