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