Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(385)

Side by Side Diff: content/browser/browser_main_loop.cc

Issue 2163883005: WIP: Obtain Bootstrap from utility process Service (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/browser/browser_main_loop.h ('k') | content/browser/frame_host/frame_mojo_shell.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 8
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 #include "content/browser/gpu/browser_gpu_channel_host_factory.h" 50 #include "content/browser/gpu/browser_gpu_channel_host_factory.h"
51 #include "content/browser/gpu/browser_gpu_memory_buffer_manager.h" 51 #include "content/browser/gpu/browser_gpu_memory_buffer_manager.h"
52 #include "content/browser/gpu/compositor_util.h" 52 #include "content/browser/gpu/compositor_util.h"
53 #include "content/browser/gpu/gpu_data_manager_impl.h" 53 #include "content/browser/gpu/gpu_data_manager_impl.h"
54 #include "content/browser/gpu/gpu_process_host.h" 54 #include "content/browser/gpu/gpu_process_host.h"
55 #include "content/browser/gpu/gpu_process_host_ui_shim.h" 55 #include "content/browser/gpu/gpu_process_host_ui_shim.h"
56 #include "content/browser/histogram_synchronizer.h" 56 #include "content/browser/histogram_synchronizer.h"
57 #include "content/browser/loader/resource_dispatcher_host_impl.h" 57 #include "content/browser/loader/resource_dispatcher_host_impl.h"
58 #include "content/browser/loader_delegate_impl.h" 58 #include "content/browser/loader_delegate_impl.h"
59 #include "content/browser/media/media_internals.h" 59 #include "content/browser/media/media_internals.h"
60 #include "content/browser/mojo/mojo_shell_context.h" 60 #include "content/browser/mojo/service_manager_context_impl.h"
61 #include "content/browser/net/browser_online_state_observer.h" 61 #include "content/browser/net/browser_online_state_observer.h"
62 #include "content/browser/renderer_host/media/media_stream_manager.h" 62 #include "content/browser/renderer_host/media/media_stream_manager.h"
63 #include "content/browser/renderer_host/render_process_host_impl.h" 63 #include "content/browser/renderer_host/render_process_host_impl.h"
64 #include "content/browser/speech/speech_recognition_manager_impl.h" 64 #include "content/browser/speech/speech_recognition_manager_impl.h"
65 #include "content/browser/startup_task_runner.h" 65 #include "content/browser/startup_task_runner.h"
66 #include "content/browser/time_zone_monitor.h" 66 #include "content/browser/time_zone_monitor.h"
67 #include "content/browser/utility_process_host_impl.h" 67 #include "content/browser/utility_process_host_impl.h"
68 #include "content/browser/webui/content_web_ui_controller_factory.h" 68 #include "content/browser/webui/content_web_ui_controller_factory.h"
69 #include "content/browser/webui/url_data_manager.h" 69 #include "content/browser/webui/url_data_manager.h"
70 #include "content/common/content_switches_internal.h" 70 #include "content/common/content_switches_internal.h"
(...skipping 968 matching lines...) Expand 10 before | Expand all | Expand 10 after
1039 // On Mac and windows, the monitor needs to be destroyed on the same thread 1039 // On Mac and windows, the monitor needs to be destroyed on the same thread
1040 // as they were created. On Linux, the monitor will be deleted when IO thread 1040 // as they were created. On Linux, the monitor will be deleted when IO thread
1041 // goes away. 1041 // goes away.
1042 #if defined(OS_WIN) 1042 #if defined(OS_WIN)
1043 system_message_window_.reset(); 1043 system_message_window_.reset();
1044 #elif defined(OS_MACOSX) 1044 #elif defined(OS_MACOSX)
1045 device_monitor_mac_.reset(); 1045 device_monitor_mac_.reset();
1046 #endif 1046 #endif
1047 1047
1048 // Shutdown Mojo shell and IPC. 1048 // Shutdown Mojo shell and IPC.
1049 mojo_shell_context_.reset(); 1049 service_manager_context_.reset();
1050 mojo_ipc_support_.reset(); 1050 mojo_ipc_support_.reset();
1051 1051
1052 // Must be size_t so we can subtract from it. 1052 // Must be size_t so we can subtract from it.
1053 for (size_t thread_id = BrowserThread::ID_COUNT - 1; 1053 for (size_t thread_id = BrowserThread::ID_COUNT - 1;
1054 thread_id >= (BrowserThread::UI + 1); 1054 thread_id >= (BrowserThread::UI + 1);
1055 --thread_id) { 1055 --thread_id) {
1056 // Find the thread object we want to stop. Looping over all valid 1056 // Find the thread object we want to stop. Looping over all valid
1057 // BrowserThread IDs and DCHECKing on a missing case in the switch 1057 // BrowserThread IDs and DCHECKing on a missing case in the switch
1058 // statement helps avoid a mismatch between this code and the 1058 // statement helps avoid a mismatch between this code and the
1059 // BrowserThread::ID enumeration. 1059 // BrowserThread::ID enumeration.
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
1193 bool sync_call_allowed = false; 1193 bool sync_call_allowed = false;
1194 MojoResult result = mojo::edk::SetProperty( 1194 MojoResult result = mojo::edk::SetProperty(
1195 MOJO_PROPERTY_TYPE_SYNC_CALL_ALLOWED, &sync_call_allowed); 1195 MOJO_PROPERTY_TYPE_SYNC_CALL_ALLOWED, &sync_call_allowed);
1196 DCHECK_EQ(MOJO_RESULT_OK, result); 1196 DCHECK_EQ(MOJO_RESULT_OK, result);
1197 } 1197 }
1198 1198
1199 mojo_ipc_support_.reset(new mojo::edk::ScopedIPCSupport( 1199 mojo_ipc_support_.reset(new mojo::edk::ScopedIPCSupport(
1200 BrowserThread::UnsafeGetMessageLoopForThread(BrowserThread::IO) 1200 BrowserThread::UnsafeGetMessageLoopForThread(BrowserThread::IO)
1201 ->task_runner())); 1201 ->task_runner()));
1202 1202
1203 mojo_shell_context_.reset(new MojoShellContext); 1203 service_manager_context_ = ServiceManagerContext::Create();
1204 #if defined(MOJO_SHELL_CLIENT) && defined(USE_AURA) 1204 #if defined(MOJO_SHELL_CLIENT) && defined(USE_AURA)
1205 // TODO(rockot): Remove the blocking wait for init. 1205 // TODO(rockot): Remove the blocking wait for init.
1206 // http://crbug.com/594852. 1206 // http://crbug.com/594852.
1207 if (shell::ShellIsRemote() && MojoShellConnection::GetForProcess()) { 1207 if (shell::ShellIsRemote() && MojoShellConnection::GetForProcess()) {
1208 base::CommandLine::ForCurrentProcess()->AppendSwitch( 1208 base::CommandLine::ForCurrentProcess()->AppendSwitch(
1209 switches::kIsRunningInMash); 1209 switches::kIsRunningInMash);
1210 WaitForMojoShellInitialize(); 1210 WaitForMojoShellInitialize();
1211 } 1211 }
1212 #endif 1212 #endif
1213 1213
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
1522 scoped_refptr<base::SingleThreadTaskRunner> worker_task_runner = 1522 scoped_refptr<base::SingleThreadTaskRunner> worker_task_runner =
1523 audio_thread_->task_runner(); 1523 audio_thread_->task_runner();
1524 audio_manager_ = media::AudioManager::Create(std::move(audio_task_runner), 1524 audio_manager_ = media::AudioManager::Create(std::move(audio_task_runner),
1525 std::move(worker_task_runner), 1525 std::move(worker_task_runner),
1526 MediaInternals::GetInstance()); 1526 MediaInternals::GetInstance());
1527 } 1527 }
1528 CHECK(audio_manager_); 1528 CHECK(audio_manager_);
1529 } 1529 }
1530 1530
1531 } // namespace content 1531 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/browser_main_loop.h ('k') | content/browser/frame_host/frame_mojo_shell.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698