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

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

Issue 2387263002: Rename MojoShellContext -> ServiceManagerContext. (Closed)
Patch Set: . Created 4 years, 2 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/gpu/gpu_process_host.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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 #include "content/browser/gpu/browser_gpu_channel_host_factory.h" 49 #include "content/browser/gpu/browser_gpu_channel_host_factory.h"
50 #include "content/browser/gpu/browser_gpu_memory_buffer_manager.h" 50 #include "content/browser/gpu/browser_gpu_memory_buffer_manager.h"
51 #include "content/browser/gpu/compositor_util.h" 51 #include "content/browser/gpu/compositor_util.h"
52 #include "content/browser/gpu/gpu_data_manager_impl.h" 52 #include "content/browser/gpu/gpu_data_manager_impl.h"
53 #include "content/browser/gpu/gpu_process_host.h" 53 #include "content/browser/gpu/gpu_process_host.h"
54 #include "content/browser/gpu/gpu_process_host_ui_shim.h" 54 #include "content/browser/gpu/gpu_process_host_ui_shim.h"
55 #include "content/browser/histogram_synchronizer.h" 55 #include "content/browser/histogram_synchronizer.h"
56 #include "content/browser/loader/resource_dispatcher_host_impl.h" 56 #include "content/browser/loader/resource_dispatcher_host_impl.h"
57 #include "content/browser/loader_delegate_impl.h" 57 #include "content/browser/loader_delegate_impl.h"
58 #include "content/browser/media/media_internals.h" 58 #include "content/browser/media/media_internals.h"
59 #include "content/browser/mojo/mojo_shell_context.h"
60 #include "content/browser/net/browser_online_state_observer.h" 59 #include "content/browser/net/browser_online_state_observer.h"
61 #include "content/browser/renderer_host/media/media_stream_manager.h" 60 #include "content/browser/renderer_host/media/media_stream_manager.h"
62 #include "content/browser/renderer_host/render_process_host_impl.h" 61 #include "content/browser/renderer_host/render_process_host_impl.h"
62 #include "content/browser/service_manager/service_manager_context.h"
63 #include "content/browser/speech/speech_recognition_manager_impl.h" 63 #include "content/browser/speech/speech_recognition_manager_impl.h"
64 #include "content/browser/startup_task_runner.h" 64 #include "content/browser/startup_task_runner.h"
65 #include "content/browser/utility_process_host_impl.h" 65 #include "content/browser/utility_process_host_impl.h"
66 #include "content/browser/webui/content_web_ui_controller_factory.h" 66 #include "content/browser/webui/content_web_ui_controller_factory.h"
67 #include "content/browser/webui/url_data_manager.h" 67 #include "content/browser/webui/url_data_manager.h"
68 #include "content/common/content_switches_internal.h" 68 #include "content/common/content_switches_internal.h"
69 #include "content/common/host_discardable_shared_memory_manager.h" 69 #include "content/common/host_discardable_shared_memory_manager.h"
70 #include "content/common/host_shared_bitmap_manager.h" 70 #include "content/common/host_shared_bitmap_manager.h"
71 #include "content/common/mojo/mojo_shell_connection_impl.h" 71 #include "content/common/mojo/mojo_shell_connection_impl.h"
72 #include "content/public/browser/browser_main_parts.h" 72 #include "content/public/browser/browser_main_parts.h"
(...skipping 987 matching lines...) Expand 10 before | Expand all | Expand 10 after
1060 // On Mac and windows, the monitor needs to be destroyed on the same thread 1060 // On Mac and windows, the monitor needs to be destroyed on the same thread
1061 // as they were created. On Linux, the monitor will be deleted when IO thread 1061 // as they were created. On Linux, the monitor will be deleted when IO thread
1062 // goes away. 1062 // goes away.
1063 #if defined(OS_WIN) 1063 #if defined(OS_WIN)
1064 system_message_window_.reset(); 1064 system_message_window_.reset();
1065 #elif defined(OS_MACOSX) 1065 #elif defined(OS_MACOSX)
1066 device_monitor_mac_.reset(); 1066 device_monitor_mac_.reset();
1067 #endif 1067 #endif
1068 1068
1069 // Shutdown Mojo shell and IPC. 1069 // Shutdown Mojo shell and IPC.
1070 mojo_shell_context_.reset(); 1070 service_manager_context_.reset();
1071 mojo_ipc_support_.reset(); 1071 mojo_ipc_support_.reset();
1072 1072
1073 // Must be size_t so we can subtract from it. 1073 // Must be size_t so we can subtract from it.
1074 for (size_t thread_id = BrowserThread::ID_COUNT - 1; 1074 for (size_t thread_id = BrowserThread::ID_COUNT - 1;
1075 thread_id >= (BrowserThread::UI + 1); 1075 thread_id >= (BrowserThread::UI + 1);
1076 --thread_id) { 1076 --thread_id) {
1077 // Find the thread object we want to stop. Looping over all valid 1077 // Find the thread object we want to stop. Looping over all valid
1078 // BrowserThread IDs and DCHECKing on a missing case in the switch 1078 // BrowserThread IDs and DCHECKing on a missing case in the switch
1079 // statement helps avoid a mismatch between this code and the 1079 // statement helps avoid a mismatch between this code and the
1080 // BrowserThread::ID enumeration. 1080 // BrowserThread::ID enumeration.
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after
1464 bool sync_call_allowed = false; 1464 bool sync_call_allowed = false;
1465 MojoResult result = mojo::edk::SetProperty( 1465 MojoResult result = mojo::edk::SetProperty(
1466 MOJO_PROPERTY_TYPE_SYNC_CALL_ALLOWED, &sync_call_allowed); 1466 MOJO_PROPERTY_TYPE_SYNC_CALL_ALLOWED, &sync_call_allowed);
1467 DCHECK_EQ(MOJO_RESULT_OK, result); 1467 DCHECK_EQ(MOJO_RESULT_OK, result);
1468 } 1468 }
1469 1469
1470 mojo_ipc_support_.reset(new mojo::edk::ScopedIPCSupport( 1470 mojo_ipc_support_.reset(new mojo::edk::ScopedIPCSupport(
1471 BrowserThread::UnsafeGetMessageLoopForThread(BrowserThread::IO) 1471 BrowserThread::UnsafeGetMessageLoopForThread(BrowserThread::IO)
1472 ->task_runner())); 1472 ->task_runner()));
1473 1473
1474 mojo_shell_context_.reset(new MojoShellContext); 1474 service_manager_context_.reset(new ServiceManagerContext);
1475 #if defined(OS_MACOSX) 1475 #if defined(OS_MACOSX)
1476 mojo::edk::SetMachPortProvider(MachBroker::GetInstance()); 1476 mojo::edk::SetMachPortProvider(MachBroker::GetInstance());
1477 #endif // defined(OS_MACOSX) 1477 #endif // defined(OS_MACOSX)
1478 if (parts_) 1478 if (parts_)
1479 parts_->MojoShellConnectionStarted(MojoShellConnection::GetForProcess()); 1479 parts_->MojoShellConnectionStarted(MojoShellConnection::GetForProcess());
1480 } 1480 }
1481 1481
1482 base::FilePath BrowserMainLoop::GetStartupTraceFileName( 1482 base::FilePath BrowserMainLoop::GetStartupTraceFileName(
1483 const base::CommandLine& command_line) const { 1483 const base::CommandLine& command_line) const {
1484 base::FilePath trace_file; 1484 base::FilePath trace_file;
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
1569 scoped_refptr<base::SingleThreadTaskRunner> worker_task_runner = 1569 scoped_refptr<base::SingleThreadTaskRunner> worker_task_runner =
1570 audio_thread_->task_runner(); 1570 audio_thread_->task_runner();
1571 audio_manager_ = media::AudioManager::Create(std::move(audio_task_runner), 1571 audio_manager_ = media::AudioManager::Create(std::move(audio_task_runner),
1572 std::move(worker_task_runner), 1572 std::move(worker_task_runner),
1573 MediaInternals::GetInstance()); 1573 MediaInternals::GetInstance());
1574 } 1574 }
1575 CHECK(audio_manager_); 1575 CHECK(audio_manager_);
1576 } 1576 }
1577 1577
1578 } // namespace content 1578 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/browser_main_loop.h ('k') | content/browser/gpu/gpu_process_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698