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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 #if defined(USE_AURA) | 65 #if defined(USE_AURA) |
66 #include "content/browser/aura/image_transport_factory.h" | 66 #include "content/browser/aura/image_transport_factory.h" |
67 #endif | 67 #endif |
68 | 68 |
69 #if defined(OS_ANDROID) | 69 #if defined(OS_ANDROID) |
70 #include "base/android/jni_android.h" | 70 #include "base/android/jni_android.h" |
71 #include "content/browser/android/browser_startup_controller.h" | 71 #include "content/browser/android/browser_startup_controller.h" |
72 #include "content/browser/android/surface_texture_peer_browser_impl.h" | 72 #include "content/browser/android/surface_texture_peer_browser_impl.h" |
73 #endif | 73 #endif |
74 | 74 |
75 #if defined(OS_MACOSX) | 75 #if defined(OS_MACOSX) && !defined(OS_IOS) |
76 #include "content/browser/theme_helper_mac.h" | 76 #include "content/browser/theme_helper_mac.h" |
77 #endif | 77 #endif |
78 | 78 |
79 #if defined(OS_WIN) | 79 #if defined(OS_WIN) |
80 #include <windows.h> | 80 #include <windows.h> |
81 #include <commctrl.h> | 81 #include <commctrl.h> |
82 #include <shellapi.h> | 82 #include <shellapi.h> |
83 | 83 |
84 #include "base/win/text_services_message_filter.h" | 84 #include "base/win/text_services_message_filter.h" |
85 #include "content/browser/system_message_window_win.h" | 85 #include "content/browser/system_message_window_win.h" |
(...skipping 936 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1022 !parsed_command_line_.HasSwitch(switches::kSingleProcess) && | 1022 !parsed_command_line_.HasSwitch(switches::kSingleProcess) && |
1023 !parsed_command_line_.HasSwitch(switches::kInProcessGPU)) { | 1023 !parsed_command_line_.HasSwitch(switches::kInProcessGPU)) { |
1024 TRACE_EVENT_INSTANT0("gpu", "Post task to launch GPU process", | 1024 TRACE_EVENT_INSTANT0("gpu", "Post task to launch GPU process", |
1025 TRACE_EVENT_SCOPE_THREAD); | 1025 TRACE_EVENT_SCOPE_THREAD); |
1026 BrowserThread::PostTask( | 1026 BrowserThread::PostTask( |
1027 BrowserThread::IO, FROM_HERE, base::Bind( | 1027 BrowserThread::IO, FROM_HERE, base::Bind( |
1028 base::IgnoreResult(&GpuProcessHost::Get), | 1028 base::IgnoreResult(&GpuProcessHost::Get), |
1029 GpuProcessHost::GPU_PROCESS_KIND_SANDBOXED, | 1029 GpuProcessHost::GPU_PROCESS_KIND_SANDBOXED, |
1030 CAUSE_FOR_GPU_LAUNCH_BROWSER_STARTUP)); | 1030 CAUSE_FOR_GPU_LAUNCH_BROWSER_STARTUP)); |
1031 } | 1031 } |
1032 #endif // !defined(OS_IOS) | |
1033 | 1032 |
1034 #if defined(OS_MACOSX) | 1033 #if defined(OS_MACOSX) |
1035 ThemeHelperMac::GetInstance(); | 1034 ThemeHelperMac::GetInstance(); |
1036 #endif | 1035 #endif |
| 1036 #endif // !defined(OS_IOS) |
| 1037 |
1037 return result_code_; | 1038 return result_code_; |
1038 } | 1039 } |
1039 | 1040 |
1040 void BrowserMainLoop::InitializeToolkit() { | 1041 void BrowserMainLoop::InitializeToolkit() { |
1041 TRACE_EVENT0("startup", "BrowserMainLoop::InitializeToolkit") | 1042 TRACE_EVENT0("startup", "BrowserMainLoop::InitializeToolkit") |
1042 // TODO(evan): this function is rather subtle, due to the variety | 1043 // TODO(evan): this function is rather subtle, due to the variety |
1043 // of intersecting ifdefs we have. To keep it easy to follow, there | 1044 // of intersecting ifdefs we have. To keep it easy to follow, there |
1044 // are no #else branches on any #ifs. | 1045 // are no #else branches on any #ifs. |
1045 // TODO(stevenjb): Move platform specific code into platform specific Parts | 1046 // TODO(stevenjb): Move platform specific code into platform specific Parts |
1046 // (Need to add InitializeToolkit stage to BrowserParts). | 1047 // (Need to add InitializeToolkit stage to BrowserParts). |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1112 base::TimeDelta::FromSeconds(delay_secs)); | 1113 base::TimeDelta::FromSeconds(delay_secs)); |
1113 } | 1114 } |
1114 | 1115 |
1115 void BrowserMainLoop::EndStartupTracing(const base::FilePath& trace_file) { | 1116 void BrowserMainLoop::EndStartupTracing(const base::FilePath& trace_file) { |
1116 is_tracing_startup_ = false; | 1117 is_tracing_startup_ = false; |
1117 TracingController::GetInstance()->DisableRecording( | 1118 TracingController::GetInstance()->DisableRecording( |
1118 trace_file, TracingController::TracingFileResultCallback()); | 1119 trace_file, TracingController::TracingFileResultCallback()); |
1119 } | 1120 } |
1120 | 1121 |
1121 } // namespace content | 1122 } // namespace content |
OLD | NEW |