#include <glib-object.h>
#endif
-#if defined(TOOLKIT_GTK)
-#include <gtk/gtk.h>
-#include "ui/gfx/gtk_util.h"
-#endif
-
ServiceProcess* g_service_process = NULL;
namespace {
bool ServiceProcess::Initialize(base::MessageLoopForUI* message_loop,
const CommandLine& command_line,
ServiceProcessState* state) {
-#if defined(TOOLKIT_GTK)
- // TODO(jamiewalch): Calling GtkInitFromCommandLine here causes the process
- // to abort if run headless. The correct fix for this is to refactor the
- // service process to be more modular, a task that is currently underway.
- // However, since this problem is blocking cloud print, the following quick
- // hack will have to do. Note that the situation with this hack in place is
- // no worse than it was when we weren't initializing GTK at all.
- int argc = 1;
- scoped_ptr<char*[]> argv(new char*[2]);
- argv[0] = strdup(command_line.argv()[0].c_str());
- argv[1] = NULL;
- char **argv_pointer = argv.get();
- gtk_init_check(&argc, &argv_pointer);
- free(argv[0]);
-#elif defined(USE_GLIB)
+#if defined(USE_GLIB)
// g_type_init has been deprecated since version 2.35.
#if !GLIB_CHECK_VERSION(2, 35, 0)
// GLib type system initialization is needed for gconf.