OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "content/browser/browser_main.h" | 5 #include "content/browser/browser_main.h" |
6 | 6 |
7 #include "base/allocator/allocator_shim.h" | 7 #include "base/allocator/allocator_shim.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/debug/trace_event.h" | 9 #include "base/debug/trace_event.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
285 // this is superfluous as gtk_init() ought to do this. It's | 285 // this is superfluous as gtk_init() ought to do this. It's |
286 // definitely harmless, so retained as a reminder of this | 286 // definitely harmless, so retained as a reminder of this |
287 // requirement for gconf. | 287 // requirement for gconf. |
288 g_type_init(); | 288 g_type_init(); |
289 #if defined(OS_CHROMEOS) | 289 #if defined(OS_CHROMEOS) |
290 // ChromeOS still uses dbus-glib, so initialize its threading here. | 290 // ChromeOS still uses dbus-glib, so initialize its threading here. |
291 // TODO(satorux, stevenjb): remove this once it is no longer needed. | 291 // TODO(satorux, stevenjb): remove this once it is no longer needed. |
292 dbus_g_thread_init(); | 292 dbus_g_thread_init(); |
293 #endif | 293 #endif |
294 #if defined(USE_AURA) | 294 #if defined(USE_AURA) |
295 // TODO(saintlou): We still need some GTK at the lowest level, so init here. | 295 // TODO(oshima|saintlou): Remove this once we remove gtk from build |
296 gtk_init(NULL, NULL); | 296 base::MessagePumpX::DisableGtkMessagePump(); |
297 #else | 297 #else |
298 gfx::GtkInitFromCommandLine(parameters().command_line_); | 298 gfx::GtkInitFromCommandLine(parameters().command_line_); |
299 #endif | 299 #endif |
300 SetUpGLibLogHandler(); | 300 SetUpGLibLogHandler(); |
301 #endif | 301 #endif |
302 | 302 |
303 #if defined(TOOLKIT_GTK) | 303 #if defined(TOOLKIT_GTK) |
304 // It is important for this to happen before the first run dialog, as it | 304 // It is important for this to happen before the first run dialog, as it |
305 // styles the dialog as well. | 305 // styles the dialog as well. |
306 gfx::InitRCStyles(); | 306 gfx::InitRCStyles(); |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
409 base::win::ScopedCOMInitializer com_initializer; | 409 base::win::ScopedCOMInitializer com_initializer; |
410 #endif // OS_WIN | 410 #endif // OS_WIN |
411 | 411 |
412 base::StatisticsRecorder statistics; | 412 base::StatisticsRecorder statistics; |
413 | 413 |
414 parts->RunMainMessageLoopParts(); | 414 parts->RunMainMessageLoopParts(); |
415 | 415 |
416 TRACE_EVENT_END_ETW("BrowserMain", 0, 0); | 416 TRACE_EVENT_END_ETW("BrowserMain", 0, 0); |
417 return parts->result_code(); | 417 return parts->result_code(); |
418 } | 418 } |
OLD | NEW |