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

Unified Diff: content/renderer/render_thread_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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/renderer/render_thread_impl.h ('k') | device/time_zone_monitor/OWNERS » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_thread_impl.cc
diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc
index 1e12fba797257ba657f9ccd1ce265ddb4145e7d6..a10ec11f67f4c58938b800a47d0a32b9bcf0f46f 100644
--- a/content/renderer/render_thread_impl.cc
+++ b/content/renderer/render_thread_impl.cc
@@ -584,6 +584,7 @@ RenderThreadImpl::RenderThreadImpl(
.ConnectToBrowser(true)
.Build()),
renderer_scheduler_(std::move(scheduler)),
+ time_zone_monitor_binding_(this),
categorized_worker_pool_(new CategorizedWorkerPool()) {
Init(resource_task_queue);
}
@@ -599,6 +600,7 @@ RenderThreadImpl::RenderThreadImpl(
.ConnectToBrowser(true)
.Build()),
renderer_scheduler_(std::move(scheduler)),
+ time_zone_monitor_binding_(this),
main_message_loop_(std::move(main_message_loop)),
categorized_worker_pool_(new CategorizedWorkerPool()) {
scoped_refptr<base::SingleThreadTaskRunner> test_task_counter;
@@ -851,6 +853,11 @@ void RenderThreadImpl::Init(
GetRemoteInterfaces()->GetInterface(
mojo::GetProxy(&storage_partition_service_));
+ device::mojom::TimeZoneMonitorPtr time_zone_monitor;
+ GetRemoteInterfaces()->GetInterface(mojo::GetProxy(&time_zone_monitor));
+ time_zone_monitor->AddClient(
+ time_zone_monitor_binding_.CreateInterfacePtrAndBind());
+
is_renderer_suspended_ = false;
}
@@ -1684,7 +1691,6 @@ bool RenderThreadImpl::OnControlMessageReceived(const IPC::Message& msg) {
IPC_MESSAGE_HANDLER(ViewMsg_NetworkConnectionChanged,
OnNetworkConnectionChanged)
IPC_MESSAGE_HANDLER(WorkerProcessMsg_CreateWorker, OnCreateNewSharedWorker)
- IPC_MESSAGE_HANDLER(ViewMsg_TimezoneChange, OnUpdateTimezone)
#if defined(OS_ANDROID)
IPC_MESSAGE_HANDLER(ViewMsg_SetWebKitSharedTimersSuspended,
OnSetWebKitSharedTimersSuspended)
@@ -2011,7 +2017,7 @@ void RenderThreadImpl::OnNetworkConnectionChanged(
NetConnectionTypeToWebConnectionType(type), max_bandwidth_mbps);
}
-void RenderThreadImpl::OnUpdateTimezone(const std::string& zone_id) {
+void RenderThreadImpl::OnTimeZoneChange(const std::string& zone_id) {
if (!blink_platform_impl_)
return;
if (!zone_id.empty()) {
« no previous file with comments | « content/renderer/render_thread_impl.h ('k') | device/time_zone_monitor/OWNERS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698