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

Side by Side Diff: content/browser/renderer_host/render_process_host_impl.cc

Issue 2304073003: Mojoify time zone update IPC from browser to renderer (Closed)
Patch Set: Rebase Created 4 years, 3 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
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 // Represents the browser side of the browser <--> renderer communication 5 // Represents the browser side of the browser <--> renderer communication
6 // channel. There will be one RenderProcessHost per renderer process. 6 // channel. There will be one RenderProcessHost per renderer process.
7 7
8 #include "content/browser/renderer_host/render_process_host_impl.h" 8 #include "content/browser/renderer_host/render_process_host_impl.h"
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 #include "content/browser/renderer_host/render_widget_host_impl.h" 113 #include "content/browser/renderer_host/render_widget_host_impl.h"
114 #include "content/browser/renderer_host/text_input_client_message_filter.h" 114 #include "content/browser/renderer_host/text_input_client_message_filter.h"
115 #include "content/browser/resolve_proxy_msg_helper.h" 115 #include "content/browser/resolve_proxy_msg_helper.h"
116 #include "content/browser/service_worker/service_worker_context_wrapper.h" 116 #include "content/browser/service_worker/service_worker_context_wrapper.h"
117 #include "content/browser/service_worker/service_worker_dispatcher_host.h" 117 #include "content/browser/service_worker/service_worker_dispatcher_host.h"
118 #include "content/browser/shared_worker/shared_worker_message_filter.h" 118 #include "content/browser/shared_worker/shared_worker_message_filter.h"
119 #include "content/browser/shared_worker/worker_storage_partition.h" 119 #include "content/browser/shared_worker/worker_storage_partition.h"
120 #include "content/browser/speech/speech_recognition_dispatcher_host.h" 120 #include "content/browser/speech/speech_recognition_dispatcher_host.h"
121 #include "content/browser/storage_partition_impl.h" 121 #include "content/browser/storage_partition_impl.h"
122 #include "content/browser/streams/stream_context.h" 122 #include "content/browser/streams/stream_context.h"
123 #include "content/browser/time_zone_monitor.h"
123 #include "content/browser/tracing/trace_message_filter.h" 124 #include "content/browser/tracing/trace_message_filter.h"
124 #include "content/browser/websockets/websocket_manager.h" 125 #include "content/browser/websockets/websocket_manager.h"
125 #include "content/browser/webui/web_ui_controller_factory_registry.h" 126 #include "content/browser/webui/web_ui_controller_factory_registry.h"
126 #include "content/common/child_process_host_impl.h" 127 #include "content/common/child_process_host_impl.h"
127 #include "content/common/child_process_messages.h" 128 #include "content/common/child_process_messages.h"
128 #include "content/common/content_switches_internal.h" 129 #include "content/common/content_switches_internal.h"
129 #include "content/common/frame_messages.h" 130 #include "content/common/frame_messages.h"
130 #include "content/common/gpu_host_messages.h" 131 #include "content/common/gpu_host_messages.h"
131 #include "content/common/in_process_child_thread_params.h" 132 #include "content/common/in_process_child_thread_params.h"
132 #include "content/common/mojo/mojo_child_connection.h" 133 #include "content/common/mojo/mojo_child_connection.h"
(...skipping 1100 matching lines...) Expand 10 before | Expand all | Expand 10 after
1233 AddUIThreadInterface( 1234 AddUIThreadInterface(
1234 registry.get(), 1235 registry.get(),
1235 base::Bind(&BroadcastChannelProvider::Connect, 1236 base::Bind(&BroadcastChannelProvider::Connect,
1236 base::Unretained( 1237 base::Unretained(
1237 storage_partition_impl_->GetBroadcastChannelProvider()))); 1238 storage_partition_impl_->GetBroadcastChannelProvider())));
1238 if (base::FeatureList::IsEnabled(features::kMemoryCoordinator)) { 1239 if (base::FeatureList::IsEnabled(features::kMemoryCoordinator)) {
1239 AddUIThreadInterface( 1240 AddUIThreadInterface(
1240 registry.get(), base::Bind(&CreateMemoryCoordinatorHandle, GetID())); 1241 registry.get(), base::Bind(&CreateMemoryCoordinatorHandle, GetID()));
1241 } 1242 }
1242 1243
1244 // BrowserMainLoop, which owns TimeZoneMonitor, is alive for the lifetime of
1245 // Mojo communication (see BrowserMainLoop::ShutdownThreadsAndCleanUp(),
1246 // which shuts down Mojo). Hence, passing that TimeZoneMonitor instance as
1247 // a raw pointer here is safe.
1248 AddUIThreadInterface(
1249 registry.get(),
1250 base::Bind(&TimeZoneMonitor::Bind,
1251 base::Unretained(
1252 BrowserMainLoop::GetInstance()->time_zone_monitor())));
1253
1243 scoped_refptr<base::SingleThreadTaskRunner> file_task_runner = 1254 scoped_refptr<base::SingleThreadTaskRunner> file_task_runner =
1244 BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE); 1255 BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE);
1245 registry->AddInterface(base::Bind(&MimeRegistryImpl::Create), 1256 registry->AddInterface(base::Bind(&MimeRegistryImpl::Create),
1246 file_task_runner); 1257 file_task_runner);
1247 #if defined(USE_MINIKIN_HYPHENATION) 1258 #if defined(USE_MINIKIN_HYPHENATION)
1248 registry->AddInterface(base::Bind(&hyphenation::HyphenationImpl::Create), 1259 registry->AddInterface(base::Bind(&hyphenation::HyphenationImpl::Create),
1249 file_task_runner); 1260 file_task_runner);
1250 #endif 1261 #endif
1251 1262
1252 // These callbacks will be run immediately on the IO thread. 1263 // These callbacks will be run immediately on the IO thread.
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
1306 1317
1307 int RenderProcessHostImpl::GetNextRoutingID() { 1318 int RenderProcessHostImpl::GetNextRoutingID() {
1308 return widget_helper_->GetNextRoutingID(); 1319 return widget_helper_->GetNextRoutingID();
1309 } 1320 }
1310 1321
1311 void RenderProcessHostImpl::ResumeDeferredNavigation( 1322 void RenderProcessHostImpl::ResumeDeferredNavigation(
1312 const GlobalRequestID& request_id) { 1323 const GlobalRequestID& request_id) {
1313 widget_helper_->ResumeDeferredNavigation(request_id); 1324 widget_helper_->ResumeDeferredNavigation(request_id);
1314 } 1325 }
1315 1326
1316 void RenderProcessHostImpl::NotifyTimezoneChange(const std::string& zone_id) {
1317 Send(new ViewMsg_TimezoneChange(zone_id));
1318 }
1319
1320 shell::InterfaceProvider* RenderProcessHostImpl::GetRemoteInterfaces() { 1327 shell::InterfaceProvider* RenderProcessHostImpl::GetRemoteInterfaces() {
1321 return mojo_child_connection_->GetRemoteInterfaces(); 1328 return mojo_child_connection_->GetRemoteInterfaces();
1322 } 1329 }
1323 1330
1324 std::unique_ptr<base::SharedPersistentMemoryAllocator> 1331 std::unique_ptr<base::SharedPersistentMemoryAllocator>
1325 RenderProcessHostImpl::TakeMetricsAllocator() { 1332 RenderProcessHostImpl::TakeMetricsAllocator() {
1326 return std::move(metrics_allocator_); 1333 return std::move(metrics_allocator_);
1327 } 1334 }
1328 1335
1329 const base::TimeTicks& RenderProcessHostImpl::GetInitTimeForNavigationMetrics() 1336 const base::TimeTicks& RenderProcessHostImpl::GetInitTimeForNavigationMetrics()
(...skipping 1656 matching lines...) Expand 10 before | Expand all | Expand 10 after
2986 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error; 2993 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error;
2987 2994
2988 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing. Alias 2995 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing. Alias
2989 // enough information here so that we can determine what the bad message was. 2996 // enough information here so that we can determine what the bad message was.
2990 base::debug::Alias(&error); 2997 base::debug::Alias(&error);
2991 bad_message::ReceivedBadMessage(process.get(), 2998 bad_message::ReceivedBadMessage(process.get(),
2992 bad_message::RPH_MOJO_PROCESS_ERROR); 2999 bad_message::RPH_MOJO_PROCESS_ERROR);
2993 } 3000 }
2994 3001
2995 } // namespace content 3002 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_process_host_impl.h ('k') | content/browser/time_zone_monitor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698