Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(123)

Side by Side Diff: content/browser/browser_main_loop.cc

Issue 8341052: share all the needed linux code with OpenBSD in chrome and content (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: wrap long lines Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/app/content_main.cc ('k') | content/browser/gpu/gpu_blacklist.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_loop.h" 5 #include "content/browser/browser_main_loop.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/debug/trace_event.h" 8 #include "base/debug/trace_event.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 19 matching lines...) Expand all
30 #if defined(OS_WIN) 30 #if defined(OS_WIN)
31 #include <windows.h> 31 #include <windows.h>
32 #include <commctrl.h> 32 #include <commctrl.h>
33 #include <ole2.h> 33 #include <ole2.h>
34 #include <shellapi.h> 34 #include <shellapi.h>
35 35
36 #include "ui/base/l10n/l10n_util_win.h" 36 #include "ui/base/l10n/l10n_util_win.h"
37 #include "net/base/winsock_init.h" 37 #include "net/base/winsock_init.h"
38 #endif 38 #endif
39 39
40 #if defined(OS_LINUX) 40 #if defined(OS_LINUX) || defined(OS_OPENBSD)
41 #include <glib-object.h> 41 #include <glib-object.h>
42 #endif 42 #endif
43 43
44 #if defined(OS_CHROMEOS) 44 #if defined(OS_CHROMEOS)
45 #include <dbus/dbus-glib.h> 45 #include <dbus/dbus-glib.h>
46 #endif 46 #endif
47 47
48 #if defined(TOOLKIT_USES_GTK) 48 #if defined(TOOLKIT_USES_GTK)
49 #include "ui/gfx/gtk_util.h" 49 #include "ui/gfx/gtk_util.h"
50 #endif 50 #endif
(...skipping 29 matching lines...) Expand all
80 sandbox_cmd = sandbox_binary; 80 sandbox_cmd = sandbox_binary;
81 81
82 // Tickle the sandbox host and zygote host so they fork now. 82 // Tickle the sandbox host and zygote host so they fork now.
83 RenderSandboxHostLinux* shost = RenderSandboxHostLinux::GetInstance(); 83 RenderSandboxHostLinux* shost = RenderSandboxHostLinux::GetInstance();
84 shost->Init(sandbox_cmd); 84 shost->Init(sandbox_cmd);
85 ZygoteHost* zhost = ZygoteHost::GetInstance(); 85 ZygoteHost* zhost = ZygoteHost::GetInstance();
86 zhost->Init(sandbox_cmd); 86 zhost->Init(sandbox_cmd);
87 } 87 }
88 #endif 88 #endif
89 89
90 #if defined(OS_LINUX) 90 #if defined(OS_LINUX) || defined(OS_OPENBSD)
91 static void GLibLogHandler(const gchar* log_domain, 91 static void GLibLogHandler(const gchar* log_domain,
92 GLogLevelFlags log_level, 92 GLogLevelFlags log_level,
93 const gchar* message, 93 const gchar* message,
94 gpointer userdata) { 94 gpointer userdata) {
95 if (!log_domain) 95 if (!log_domain)
96 log_domain = "<unknown>"; 96 log_domain = "<unknown>";
97 if (!message) 97 if (!message)
98 message = "<no message>"; 98 message = "<no message>";
99 99
100 if (strstr(message, "Loading IM context type") || 100 if (strstr(message, "Loading IM context type") ||
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 main_thread_.reset(new BrowserThreadImpl(BrowserThread::UI, 303 main_thread_.reset(new BrowserThreadImpl(BrowserThread::UI,
304 MessageLoop::current())); 304 MessageLoop::current()));
305 } 305 }
306 306
307 void BrowserMainLoop::InitializeToolkit() { 307 void BrowserMainLoop::InitializeToolkit() {
308 // TODO(evan): this function is rather subtle, due to the variety 308 // TODO(evan): this function is rather subtle, due to the variety
309 // of intersecting ifdefs we have. To keep it easy to follow, there 309 // of intersecting ifdefs we have. To keep it easy to follow, there
310 // are no #else branches on any #ifs. 310 // are no #else branches on any #ifs.
311 // TODO(stevenjb): Move platform specific code into platform specific Parts 311 // TODO(stevenjb): Move platform specific code into platform specific Parts
312 // (Need to add InitializeToolkit stage to BrowserParts). 312 // (Need to add InitializeToolkit stage to BrowserParts).
313 #if defined(OS_LINUX) 313 #if defined(OS_LINUX) || defined(OS_OPENBSD)
314 // Glib type system initialization. Needed at least for gconf, 314 // Glib type system initialization. Needed at least for gconf,
315 // used in net/proxy/proxy_config_service_linux.cc. Most likely 315 // used in net/proxy/proxy_config_service_linux.cc. Most likely
316 // this is superfluous as gtk_init() ought to do this. It's 316 // this is superfluous as gtk_init() ought to do this. It's
317 // definitely harmless, so retained as a reminder of this 317 // definitely harmless, so retained as a reminder of this
318 // requirement for gconf. 318 // requirement for gconf.
319 g_type_init(); 319 g_type_init();
320 320
321 #if !defined(USE_AURA) 321 #if !defined(USE_AURA)
322 gfx::GtkInitFromCommandLine(parameters_.command_line); 322 gfx::GtkInitFromCommandLine(parameters_.command_line);
323 #endif 323 #endif
(...skipping 25 matching lines...) Expand all
349 MessageLoopForUI::current()->PostTask(FROM_HERE, parameters_.ui_task); 349 MessageLoopForUI::current()->PostTask(FROM_HERE, parameters_.ui_task);
350 350
351 #if defined(OS_MACOSX) 351 #if defined(OS_MACOSX)
352 MessageLoopForUI::current()->Run(); 352 MessageLoopForUI::current()->Run();
353 #else 353 #else
354 MessageLoopForUI::current()->RunWithDispatcher(NULL); 354 MessageLoopForUI::current()->RunWithDispatcher(NULL);
355 #endif 355 #endif
356 } 356 }
357 357
358 } // namespace content 358 } // namespace content
OLDNEW
« no previous file with comments | « content/app/content_main.cc ('k') | content/browser/gpu/gpu_blacklist.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698