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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 #if defined(OS_ANDROID) | 79 #if defined(OS_ANDROID) |
80 #include "base/android/jni_android.h" | 80 #include "base/android/jni_android.h" |
81 #include "content/browser/android/browser_startup_controller.h" | 81 #include "content/browser/android/browser_startup_controller.h" |
82 #include "content/browser/android/surface_texture_peer_browser_impl.h" | 82 #include "content/browser/android/surface_texture_peer_browser_impl.h" |
83 #include "content/browser/android/tracing_controller_android.h" | 83 #include "content/browser/android/tracing_controller_android.h" |
84 #include "ui/gl/gl_surface.h" | 84 #include "ui/gl/gl_surface.h" |
85 #endif | 85 #endif |
86 | 86 |
87 #if defined(OS_MACOSX) && !defined(OS_IOS) | 87 #if defined(OS_MACOSX) && !defined(OS_IOS) |
88 #include "content/browser/bootstrap_sandbox_mac.h" | 88 #include "content/browser/bootstrap_sandbox_mac.h" |
89 #include "content/browser/cocoa/system_hotkey_helper_mac.h" | |
90 #include "content/browser/theme_helper_mac.h" | 89 #include "content/browser/theme_helper_mac.h" |
91 #endif | 90 #endif |
92 | 91 |
93 #if defined(OS_WIN) | 92 #if defined(OS_WIN) |
94 #include <windows.h> | 93 #include <windows.h> |
95 #include <commctrl.h> | 94 #include <commctrl.h> |
96 #include <shellapi.h> | 95 #include <shellapi.h> |
97 | 96 |
98 #include "content/browser/system_message_window_win.h" | 97 #include "content/browser/system_message_window_win.h" |
99 #include "content/common/sandbox_win.h" | 98 #include "content/common/sandbox_win.h" |
(...skipping 942 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1042 TRACE_EVENT_SCOPE_THREAD); | 1041 TRACE_EVENT_SCOPE_THREAD); |
1043 BrowserThread::PostTask( | 1042 BrowserThread::PostTask( |
1044 BrowserThread::IO, FROM_HERE, base::Bind( | 1043 BrowserThread::IO, FROM_HERE, base::Bind( |
1045 base::IgnoreResult(&GpuProcessHost::Get), | 1044 base::IgnoreResult(&GpuProcessHost::Get), |
1046 GpuProcessHost::GPU_PROCESS_KIND_SANDBOXED, | 1045 GpuProcessHost::GPU_PROCESS_KIND_SANDBOXED, |
1047 CAUSE_FOR_GPU_LAUNCH_BROWSER_STARTUP)); | 1046 CAUSE_FOR_GPU_LAUNCH_BROWSER_STARTUP)); |
1048 } | 1047 } |
1049 | 1048 |
1050 #if defined(OS_MACOSX) | 1049 #if defined(OS_MACOSX) |
1051 ThemeHelperMac::GetInstance(); | 1050 ThemeHelperMac::GetInstance(); |
1052 SystemHotkeyHelperMac::GetInstance()->DeferredLoadSystemHotkeys(); | |
1053 if (ShouldEnableBootstrapSandbox()) { | 1051 if (ShouldEnableBootstrapSandbox()) { |
1054 TRACE_EVENT0("startup", | 1052 TRACE_EVENT0("startup", |
1055 "BrowserMainLoop::BrowserThreadsStarted:BootstrapSandbox"); | 1053 "BrowserMainLoop::BrowserThreadsStarted:BootstrapSandbox"); |
1056 CHECK(GetBootstrapSandbox()); | 1054 CHECK(GetBootstrapSandbox()); |
1057 } | 1055 } |
1058 #endif // defined(OS_MACOSX) | 1056 #endif // defined(OS_MACOSX) |
1059 | 1057 |
1060 #endif // !defined(OS_IOS) | 1058 #endif // !defined(OS_IOS) |
1061 | 1059 |
1062 return result_code_; | 1060 return result_code_; |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1155 &BrowserMainLoop::EndStartupTracing); | 1153 &BrowserMainLoop::EndStartupTracing); |
1156 } | 1154 } |
1157 | 1155 |
1158 void BrowserMainLoop::EndStartupTracing() { | 1156 void BrowserMainLoop::EndStartupTracing() { |
1159 is_tracing_startup_ = false; | 1157 is_tracing_startup_ = false; |
1160 TracingController::GetInstance()->DisableRecording( | 1158 TracingController::GetInstance()->DisableRecording( |
1161 startup_trace_file_, base::Bind(&OnStoppedStartupTracing)); | 1159 startup_trace_file_, base::Bind(&OnStoppedStartupTracing)); |
1162 } | 1160 } |
1163 | 1161 |
1164 } // namespace content | 1162 } // namespace content |
OLD | NEW |