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

Unified 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 side-by-side diff with in-line comments
Download patch
« 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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/render_process_host_impl.cc
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
index 92b21326af7813203bad589fd65de70f164fe1ab..a8cefbf4a754ec24060265ba91e1d8d10250d823 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -120,6 +120,7 @@
#include "content/browser/speech/speech_recognition_dispatcher_host.h"
#include "content/browser/storage_partition_impl.h"
#include "content/browser/streams/stream_context.h"
+#include "content/browser/time_zone_monitor.h"
#include "content/browser/tracing/trace_message_filter.h"
#include "content/browser/websockets/websocket_manager.h"
#include "content/browser/webui/web_ui_controller_factory_registry.h"
@@ -1240,6 +1241,16 @@ void RenderProcessHostImpl::RegisterMojoInterfaces() {
registry.get(), base::Bind(&CreateMemoryCoordinatorHandle, GetID()));
}
+ // BrowserMainLoop, which owns TimeZoneMonitor, is alive for the lifetime of
+ // Mojo communication (see BrowserMainLoop::ShutdownThreadsAndCleanUp(),
+ // which shuts down Mojo). Hence, passing that TimeZoneMonitor instance as
+ // a raw pointer here is safe.
+ AddUIThreadInterface(
+ registry.get(),
+ base::Bind(&TimeZoneMonitor::Bind,
+ base::Unretained(
+ BrowserMainLoop::GetInstance()->time_zone_monitor())));
+
scoped_refptr<base::SingleThreadTaskRunner> file_task_runner =
BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE);
registry->AddInterface(base::Bind(&MimeRegistryImpl::Create),
@@ -1313,10 +1324,6 @@ void RenderProcessHostImpl::ResumeDeferredNavigation(
widget_helper_->ResumeDeferredNavigation(request_id);
}
-void RenderProcessHostImpl::NotifyTimezoneChange(const std::string& zone_id) {
- Send(new ViewMsg_TimezoneChange(zone_id));
-}
-
shell::InterfaceProvider* RenderProcessHostImpl::GetRemoteInterfaces() {
return mojo_child_connection_->GetRemoteInterfaces();
}
« 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