#include "base/android/jni_android.h"
#include "content/browser/android/browser_startup_controller.h"
#include "content/browser/android/surface_texture_peer_browser_impl.h"
+#include "ui/gl/gl_surface.h"
#endif
#if defined(OS_MACOSX) && !defined(OS_IOS)
#include <commctrl.h>
#include <shellapi.h>
-#include "base/win/text_services_message_filter.h"
#include "content/browser/system_message_window_win.h"
#include "content/common/sandbox_win.h"
#include "net/base/winsock_init.h"
#include <X11/Xlib.h>
#endif
+#if defined(USE_OZONE)
+#include "ui/ozone/ozone_platform.h"
+#endif
+
// One of the linux specific headers defines this as a macro.
#ifdef DestroyAll
#undef DestroyAll
created_threads_(false),
// ContentMainRunner should have enabled tracing of the browser process
// when kTraceStartup is in the command line.
- is_tracing_startup_(base::debug::TraceLog::GetInstance()->IsEnabled()) {
+ is_tracing_startup_(
+ parameters.command_line.HasSwitch(switches::kTraceStartup)) {
DCHECK(!g_current_browser_main_loop);
g_current_browser_main_loop = this;
}
MediaInternals::GetInstance()));
}
{
- TRACE_EVENT0("startup", "BrowserMainLoop::Subsystem:MIDIManager")
- midi_manager_.reset(media::MIDIManager::Create());
+ TRACE_EVENT0("startup", "BrowserMainLoop::Subsystem:MidiManager")
+ midi_manager_.reset(media::MidiManager::Create());
}
{
TRACE_EVENT0("startup", "BrowserMainLoop::Subsystem:ContentWebUIController")
#if defined(OS_WIN)
system_message_window_.reset(new SystemMessageWindowWin);
-
- if (base::win::IsTSFAwareRequired()) {
- // Create a TSF message filter for the message loop. MessageLoop takes
- // ownership of the filter.
- scoped_ptr<base::win::TextServicesMessageFilter> tsf_message_filter(
- new base::win::TextServicesMessageFilter);
- if (tsf_message_filter->Init()) {
- base::MessageLoopForUI::current()->SetMessageFilter(
- tsf_message_filter.PassAs<base::MessageLoopForUI::MessageFilter>());
- }
- }
#endif
if (parts_)
}
#endif
+#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID)
+ ZygoteHostImpl::GetInstance()->TearDownAfterLastChild();
+#endif // defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID)
+
// The device monitors are using |system_monitor_| as dependency, so delete
// them before |system_monitor_| goes away.
// On Mac and windows, the monitor needs to be destroyed on the same thread
#if !defined(OS_IOS)
HistogramSynchronizer::GetInstance();
+#if defined(OS_ANDROID)
+ // On Android, GLSurface::InitializeOneOff() must be called before initalizing
+ // the GpuDataManagerImpl as it uses the GL bindings. crbug.com/326295
+ if (!gfx::GLSurface::InitializeOneOff())
+ LOG(FATAL) << "GLSurface::InitializeOneOff failed";
+#endif
+
// Initialize the GpuDataManager before we set up the MessageLoops because
// otherwise we'll trigger the assertion about doing IO on the UI thread.
GpuDataManagerImpl::GetInstance()->Initialize();
device_monitor_mac_.reset(new DeviceMonitorMac());
#endif
+#if defined(USE_OZONE)
+ ui::OzonePlatform::Initialize();
+ ui::EventFactoryOzone::GetInstance()->SetFileTaskRunner(
+ BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE));
+#endif
+
// RDH needs the IO thread to be created
{
TRACE_EVENT0("startup",