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 <stddef.h> | 7 #include <stddef.h> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 #include "content/browser/compositor/image_transport_factory.h" | 91 #include "content/browser/compositor/image_transport_factory.h" |
92 #endif | 92 #endif |
93 | 93 |
94 #if defined(USE_AURA) | 94 #if defined(USE_AURA) |
95 #include "content/public/browser/context_factory.h" | 95 #include "content/public/browser/context_factory.h" |
96 #include "ui/aura/env.h" | 96 #include "ui/aura/env.h" |
97 #endif | 97 #endif |
98 | 98 |
99 #if !defined(OS_IOS) | 99 #if !defined(OS_IOS) |
100 #include "content/browser/renderer_host/render_process_host_impl.h" | 100 #include "content/browser/renderer_host/render_process_host_impl.h" |
| 101 #include "ipc/attachment_broker.h" |
| 102 #include "ipc/attachment_broker_privileged.h" |
101 #endif | 103 #endif |
102 | 104 |
103 #if defined(OS_ANDROID) | 105 #if defined(OS_ANDROID) |
104 #include "base/android/jni_android.h" | 106 #include "base/android/jni_android.h" |
105 #include "components/tracing/graphics_memory_dump_provider_android.h" | 107 #include "components/tracing/graphics_memory_dump_provider_android.h" |
106 #include "content/browser/android/browser_startup_controller.h" | 108 #include "content/browser/android/browser_startup_controller.h" |
107 #include "content/browser/android/browser_surface_texture_manager.h" | 109 #include "content/browser/android/browser_surface_texture_manager.h" |
108 #include "content/browser/android/in_process_surface_texture_manager.h" | 110 #include "content/browser/android/in_process_surface_texture_manager.h" |
109 #include "content/browser/android/tracing_controller_android.h" | 111 #include "content/browser/android/tracing_controller_android.h" |
110 #include "content/browser/screen_orientation/screen_orientation_delegate_android
.h" | 112 #include "content/browser/screen_orientation/screen_orientation_delegate_android
.h" |
(...skipping 1088 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1199 // Bring up Mojo IPC and shell as early as possible. | 1201 // Bring up Mojo IPC and shell as early as possible. |
1200 mojo_ipc_support_.reset(new IPC::ScopedIPCSupport( | 1202 mojo_ipc_support_.reset(new IPC::ScopedIPCSupport( |
1201 BrowserThread::UnsafeGetMessageLoopForThread(BrowserThread::IO) | 1203 BrowserThread::UnsafeGetMessageLoopForThread(BrowserThread::IO) |
1202 ->task_runner())); | 1204 ->task_runner())); |
1203 mojo_shell_context_.reset(new MojoShellContext); | 1205 mojo_shell_context_.reset(new MojoShellContext); |
1204 #if defined(OS_MACOSX) | 1206 #if defined(OS_MACOSX) |
1205 mojo::edk::SetMachPortProvider(MachBroker::GetInstance()); | 1207 mojo::edk::SetMachPortProvider(MachBroker::GetInstance()); |
1206 #endif // defined(OS_MACOSX) | 1208 #endif // defined(OS_MACOSX) |
1207 #endif // !defined(OS_IOS) | 1209 #endif // !defined(OS_IOS) |
1208 | 1210 |
| 1211 #if USE_ATTACHMENT_BROKER |
| 1212 // Construct the privileged attachment broker early. This ensures that when a |
| 1213 // test is being run in one of the single process modes, the global attachment |
| 1214 // broker is the privileged attachment broker, rather than an unprivileged |
| 1215 // attachment broker. |
| 1216 #if defined(OS_MACOSX) && !defined(OS_IOS) |
| 1217 IPC::AttachmentBrokerPrivileged::CreateBrokerIfNeeded( |
| 1218 MachBroker::GetInstance()); |
| 1219 #else |
| 1220 IPC::AttachmentBrokerPrivileged::CreateBrokerIfNeeded(); |
| 1221 #endif // defined(OS_MACOSX) && !defined(OS_IOS) |
| 1222 #endif // USE_ATTACHMENT_BROKER |
| 1223 |
1209 #if !defined(OS_IOS) | 1224 #if !defined(OS_IOS) |
1210 indexed_db_thread_.reset(new base::Thread("IndexedDB")); | 1225 indexed_db_thread_.reset(new base::Thread("IndexedDB")); |
1211 indexed_db_thread_->Start(); | 1226 indexed_db_thread_->Start(); |
1212 #endif | 1227 #endif |
1213 | 1228 |
1214 #if !defined(OS_IOS) | 1229 #if !defined(OS_IOS) |
1215 HistogramSynchronizer::GetInstance(); | 1230 HistogramSynchronizer::GetInstance(); |
1216 #if defined(OS_ANDROID) || defined(OS_CHROMEOS) | 1231 #if defined(OS_ANDROID) || defined(OS_CHROMEOS) |
1217 // Up the priority of the UI thread. | 1232 // Up the priority of the UI thread. |
1218 base::PlatformThread::SetCurrentThreadPriority(base::ThreadPriority::DISPLAY); | 1233 base::PlatformThread::SetCurrentThreadPriority(base::ThreadPriority::DISPLAY); |
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1483 DCHECK(is_tracing_startup_for_duration_); | 1498 DCHECK(is_tracing_startup_for_duration_); |
1484 | 1499 |
1485 is_tracing_startup_for_duration_ = false; | 1500 is_tracing_startup_for_duration_ = false; |
1486 TracingController::GetInstance()->StopTracing( | 1501 TracingController::GetInstance()->StopTracing( |
1487 TracingController::CreateFileSink( | 1502 TracingController::CreateFileSink( |
1488 startup_trace_file_, | 1503 startup_trace_file_, |
1489 base::Bind(OnStoppedStartupTracing, startup_trace_file_))); | 1504 base::Bind(OnStoppedStartupTracing, startup_trace_file_))); |
1490 } | 1505 } |
1491 | 1506 |
1492 } // namespace content | 1507 } // namespace content |
OLD | NEW |