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

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: Switch to push 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/constants.h" 133 #include "content/common/mojo/constants.h"
(...skipping 1095 matching lines...) Expand 10 before | Expand all | Expand 10 after
1228 AddUIThreadInterface( 1229 AddUIThreadInterface(
1229 registry.get(), 1230 registry.get(),
1230 base::Bind(&BroadcastChannelProvider::Connect, 1231 base::Bind(&BroadcastChannelProvider::Connect,
1231 base::Unretained( 1232 base::Unretained(
1232 storage_partition_impl_->GetBroadcastChannelProvider()))); 1233 storage_partition_impl_->GetBroadcastChannelProvider())));
1233 if (memory_coordinator::IsEnabled()) { 1234 if (memory_coordinator::IsEnabled()) {
1234 AddUIThreadInterface( 1235 AddUIThreadInterface(
1235 registry.get(), base::Bind(&CreateMemoryCoordinatorHandle, GetID())); 1236 registry.get(), base::Bind(&CreateMemoryCoordinatorHandle, GetID()));
1236 } 1237 }
1237 1238
1239 // BrowserMainLoop, which owns TimeZoneMonitor, is alive for the lifetime of
1240 // Mojo communication (see BrowserMainLoop::ShutdownThreadsAndCleanUp(),
1241 // which shuts down Mojo). Hence, passing that TimeZoneMonitor instance as
1242 // a raw pointer here is safe.
1243 AddUIThreadInterface(
1244 registry.get(),
1245 base::Bind(&TimeZoneMonitor::Bind,
1246 base::Unretained(
1247 BrowserMainLoop::GetInstance()->time_zone_monitor())));
1248
1238 scoped_refptr<base::SingleThreadTaskRunner> file_task_runner = 1249 scoped_refptr<base::SingleThreadTaskRunner> file_task_runner =
1239 BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE); 1250 BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE);
1240 registry->AddInterface(base::Bind(&MimeRegistryImpl::Create), 1251 registry->AddInterface(base::Bind(&MimeRegistryImpl::Create),
1241 file_task_runner); 1252 file_task_runner);
1242 #if defined(USE_MINIKIN_HYPHENATION) 1253 #if defined(USE_MINIKIN_HYPHENATION)
1243 registry->AddInterface(base::Bind(&hyphenation::HyphenationImpl::Create), 1254 registry->AddInterface(base::Bind(&hyphenation::HyphenationImpl::Create),
1244 file_task_runner); 1255 file_task_runner);
1245 #endif 1256 #endif
1246 1257
1247 // These callbacks will be run immediately on the IO thread. 1258 // These callbacks will be run immediately on the IO thread.
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
1282 1293
1283 int RenderProcessHostImpl::GetNextRoutingID() { 1294 int RenderProcessHostImpl::GetNextRoutingID() {
1284 return widget_helper_->GetNextRoutingID(); 1295 return widget_helper_->GetNextRoutingID();
1285 } 1296 }
1286 1297
1287 void RenderProcessHostImpl::ResumeDeferredNavigation( 1298 void RenderProcessHostImpl::ResumeDeferredNavigation(
1288 const GlobalRequestID& request_id) { 1299 const GlobalRequestID& request_id) {
1289 widget_helper_->ResumeDeferredNavigation(request_id); 1300 widget_helper_->ResumeDeferredNavigation(request_id);
1290 } 1301 }
1291 1302
1292 void RenderProcessHostImpl::NotifyTimezoneChange(const std::string& zone_id) {
1293 Send(new ViewMsg_TimezoneChange(zone_id));
1294 }
1295
1296 shell::InterfaceProvider* RenderProcessHostImpl::GetRemoteInterfaces() { 1303 shell::InterfaceProvider* RenderProcessHostImpl::GetRemoteInterfaces() {
1297 return mojo_child_connection_->GetRemoteInterfaces(); 1304 return mojo_child_connection_->GetRemoteInterfaces();
1298 } 1305 }
1299 1306
1300 std::unique_ptr<base::SharedPersistentMemoryAllocator> 1307 std::unique_ptr<base::SharedPersistentMemoryAllocator>
1301 RenderProcessHostImpl::TakeMetricsAllocator() { 1308 RenderProcessHostImpl::TakeMetricsAllocator() {
1302 return std::move(metrics_allocator_); 1309 return std::move(metrics_allocator_);
1303 } 1310 }
1304 1311
1305 const base::TimeTicks& RenderProcessHostImpl::GetInitTimeForNavigationMetrics() 1312 const base::TimeTicks& RenderProcessHostImpl::GetInitTimeForNavigationMetrics()
(...skipping 1628 matching lines...) Expand 10 before | Expand all | Expand 10 after
2934 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error; 2941 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error;
2935 2942
2936 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing. Alias 2943 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing. Alias
2937 // enough information here so that we can determine what the bad message was. 2944 // enough information here so that we can determine what the bad message was.
2938 base::debug::Alias(&error); 2945 base::debug::Alias(&error);
2939 bad_message::ReceivedBadMessage(process.get(), 2946 bad_message::ReceivedBadMessage(process.get(),
2940 bad_message::RPH_MOJO_PROCESS_ERROR); 2947 bad_message::RPH_MOJO_PROCESS_ERROR);
2941 } 2948 }
2942 2949
2943 } // namespace content 2950 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698