OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/bind.h" | 7 #include "base/bind.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/file_util.h" | 10 #include "base/file_util.h" |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 | 75 |
76 #if defined(OS_MACOSX) && !defined(OS_IOS) | 76 #if defined(OS_MACOSX) && !defined(OS_IOS) |
77 #include "content/browser/theme_helper_mac.h" | 77 #include "content/browser/theme_helper_mac.h" |
78 #endif | 78 #endif |
79 | 79 |
80 #if defined(OS_WIN) | 80 #if defined(OS_WIN) |
81 #include <windows.h> | 81 #include <windows.h> |
82 #include <commctrl.h> | 82 #include <commctrl.h> |
83 #include <shellapi.h> | 83 #include <shellapi.h> |
84 | 84 |
85 #include "base/win/text_services_message_filter.h" | |
86 #include "content/browser/system_message_window_win.h" | 85 #include "content/browser/system_message_window_win.h" |
87 #include "content/common/sandbox_win.h" | 86 #include "content/common/sandbox_win.h" |
88 #include "net/base/winsock_init.h" | 87 #include "net/base/winsock_init.h" |
89 #include "ui/base/l10n/l10n_util_win.h" | 88 #include "ui/base/l10n/l10n_util_win.h" |
90 #endif | 89 #endif |
91 | 90 |
92 #if defined(USE_GLIB) | 91 #if defined(USE_GLIB) |
93 #include <glib-object.h> | 92 #include <glib-object.h> |
94 #endif | 93 #endif |
95 | 94 |
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
494 } | 493 } |
495 | 494 |
496 { | 495 { |
497 system_stats_monitor_.reset(new base::debug::TraceEventSystemStatsMonitor( | 496 system_stats_monitor_.reset(new base::debug::TraceEventSystemStatsMonitor( |
498 base::ThreadTaskRunnerHandle::Get())); | 497 base::ThreadTaskRunnerHandle::Get())); |
499 } | 498 } |
500 #endif // !defined(OS_IOS) | 499 #endif // !defined(OS_IOS) |
501 | 500 |
502 #if defined(OS_WIN) | 501 #if defined(OS_WIN) |
503 system_message_window_.reset(new SystemMessageWindowWin); | 502 system_message_window_.reset(new SystemMessageWindowWin); |
504 | |
505 if (base::win::IsTSFAwareRequired()) { | |
506 // Create a TSF message filter for the message loop. MessageLoop takes | |
507 // ownership of the filter. | |
508 scoped_ptr<base::win::TextServicesMessageFilter> tsf_message_filter( | |
509 new base::win::TextServicesMessageFilter); | |
510 if (tsf_message_filter->Init()) { | |
511 base::MessageLoopForUI::current()->SetMessageFilter( | |
512 tsf_message_filter.PassAs<base::MessageLoopForUI::MessageFilter>()); | |
513 } | |
514 } | |
515 #endif | 503 #endif |
516 | 504 |
517 if (parts_) | 505 if (parts_) |
518 parts_->PostMainMessageLoopStart(); | 506 parts_->PostMainMessageLoopStart(); |
519 | 507 |
520 #if defined(OS_ANDROID) | 508 #if defined(OS_ANDROID) |
521 { | 509 { |
522 TRACE_EVENT0("startup", "BrowserMainLoop::Subsystem:SurfaceTexturePeer") | 510 TRACE_EVENT0("startup", "BrowserMainLoop::Subsystem:SurfaceTexturePeer") |
523 SurfaceTexturePeer::InitInstance(new SurfaceTexturePeerBrowserImpl()); | 511 SurfaceTexturePeer::InitInstance(new SurfaceTexturePeerBrowserImpl()); |
524 } | 512 } |
(...skipping 601 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1126 base::TimeDelta::FromSeconds(delay_secs)); | 1114 base::TimeDelta::FromSeconds(delay_secs)); |
1127 } | 1115 } |
1128 | 1116 |
1129 void BrowserMainLoop::EndStartupTracing(const base::FilePath& trace_file) { | 1117 void BrowserMainLoop::EndStartupTracing(const base::FilePath& trace_file) { |
1130 is_tracing_startup_ = false; | 1118 is_tracing_startup_ = false; |
1131 TracingController::GetInstance()->DisableRecording( | 1119 TracingController::GetInstance()->DisableRecording( |
1132 trace_file, TracingController::TracingFileResultCallback()); | 1120 trace_file, TracingController::TracingFileResultCallback()); |
1133 } | 1121 } |
1134 | 1122 |
1135 } // namespace content | 1123 } // namespace content |
OLD | NEW |