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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 #if defined(USE_AURA) | 63 #if defined(USE_AURA) |
64 #include "content/browser/aura/image_transport_factory.h" | 64 #include "content/browser/aura/image_transport_factory.h" |
65 #endif | 65 #endif |
66 | 66 |
67 #if defined(OS_ANDROID) | 67 #if defined(OS_ANDROID) |
68 #include "base/android/jni_android.h" | 68 #include "base/android/jni_android.h" |
69 #include "content/browser/android/browser_startup_controller.h" | 69 #include "content/browser/android/browser_startup_controller.h" |
70 #include "content/browser/android/surface_texture_peer_browser_impl.h" | 70 #include "content/browser/android/surface_texture_peer_browser_impl.h" |
71 #endif | 71 #endif |
72 | 72 |
| 73 #if defined(OS_MACOSX) |
| 74 #include "content/browser/theme_helper_mac.h" |
| 75 #endif |
| 76 |
73 #if defined(OS_WIN) | 77 #if defined(OS_WIN) |
74 #include <windows.h> | 78 #include <windows.h> |
75 #include <commctrl.h> | 79 #include <commctrl.h> |
76 #include <shellapi.h> | 80 #include <shellapi.h> |
77 | 81 |
78 #include "base/win/text_services_message_filter.h" | 82 #include "base/win/text_services_message_filter.h" |
79 #include "content/browser/system_message_window_win.h" | 83 #include "content/browser/system_message_window_win.h" |
80 #include "content/common/sandbox_win.h" | 84 #include "content/common/sandbox_win.h" |
81 #include "net/base/winsock_init.h" | 85 #include "net/base/winsock_init.h" |
82 #include "ui/base/l10n/l10n_util_win.h" | 86 #include "ui/base/l10n/l10n_util_win.h" |
(...skipping 931 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1014 !parsed_command_line_.HasSwitch(switches::kInProcessGPU)) { | 1018 !parsed_command_line_.HasSwitch(switches::kInProcessGPU)) { |
1015 TRACE_EVENT_INSTANT0("gpu", "Post task to launch GPU process", | 1019 TRACE_EVENT_INSTANT0("gpu", "Post task to launch GPU process", |
1016 TRACE_EVENT_SCOPE_THREAD); | 1020 TRACE_EVENT_SCOPE_THREAD); |
1017 BrowserThread::PostTask( | 1021 BrowserThread::PostTask( |
1018 BrowserThread::IO, FROM_HERE, base::Bind( | 1022 BrowserThread::IO, FROM_HERE, base::Bind( |
1019 base::IgnoreResult(&GpuProcessHost::Get), | 1023 base::IgnoreResult(&GpuProcessHost::Get), |
1020 GpuProcessHost::GPU_PROCESS_KIND_SANDBOXED, | 1024 GpuProcessHost::GPU_PROCESS_KIND_SANDBOXED, |
1021 CAUSE_FOR_GPU_LAUNCH_BROWSER_STARTUP)); | 1025 CAUSE_FOR_GPU_LAUNCH_BROWSER_STARTUP)); |
1022 } | 1026 } |
1023 #endif // !defined(OS_IOS) | 1027 #endif // !defined(OS_IOS) |
| 1028 |
| 1029 #if defined(OS_MACOSX) |
| 1030 ThemeHelperMac::GetInstance(); |
| 1031 #endif |
1024 return result_code_; | 1032 return result_code_; |
1025 } | 1033 } |
1026 | 1034 |
1027 void BrowserMainLoop::InitializeToolkit() { | 1035 void BrowserMainLoop::InitializeToolkit() { |
1028 TRACE_EVENT0("startup", "BrowserMainLoop::InitializeToolkit") | 1036 TRACE_EVENT0("startup", "BrowserMainLoop::InitializeToolkit") |
1029 // TODO(evan): this function is rather subtle, due to the variety | 1037 // TODO(evan): this function is rather subtle, due to the variety |
1030 // of intersecting ifdefs we have. To keep it easy to follow, there | 1038 // of intersecting ifdefs we have. To keep it easy to follow, there |
1031 // are no #else branches on any #ifs. | 1039 // are no #else branches on any #ifs. |
1032 // TODO(stevenjb): Move platform specific code into platform specific Parts | 1040 // TODO(stevenjb): Move platform specific code into platform specific Parts |
1033 // (Need to add InitializeToolkit stage to BrowserParts). | 1041 // (Need to add InitializeToolkit stage to BrowserParts). |
(...skipping 27 matching lines...) Expand all Loading... |
1061 if (parameters_.ui_task) | 1069 if (parameters_.ui_task) |
1062 base::MessageLoopForUI::current()->PostTask(FROM_HERE, | 1070 base::MessageLoopForUI::current()->PostTask(FROM_HERE, |
1063 *parameters_.ui_task); | 1071 *parameters_.ui_task); |
1064 | 1072 |
1065 base::RunLoop run_loop; | 1073 base::RunLoop run_loop; |
1066 run_loop.Run(); | 1074 run_loop.Run(); |
1067 #endif | 1075 #endif |
1068 } | 1076 } |
1069 | 1077 |
1070 } // namespace content | 1078 } // namespace content |
OLD | NEW |