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

Unified Diff: content/browser/renderer_host/render_process_host_impl.cc

Issue 2433203003: Mojoify PoweMonitorMessageBroadcaster IPC from browser to child process (Closed)
Patch Set: code rebase 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 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/child/DEPS » ('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 f1dcab31fb7bf1deff1b29dae91138238d9d70b0..8646cc48d900ccecd4baf34320e918edc44c6857 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -90,6 +90,7 @@
#include "content/browser/notifications/platform_notification_context_impl.h"
#include "content/browser/permissions/permission_service_context.h"
#include "content/browser/permissions/permission_service_impl.h"
+#include "content/browser/power_monitor_message_broadcaster.h"
#include "content/browser/profiler_message_filter.h"
#include "content/browser/push_messaging/push_messaging_message_filter.h"
#include "content/browser/quota_dispatcher_host.h"
@@ -682,7 +683,6 @@ RenderProcessHostImpl::RenderProcessHostImpl(
gpu_observer_registered_(false),
delayed_cleanup_needed_(false),
within_process_died_observer_(false),
- power_monitor_broadcaster_(this),
#if defined(ENABLE_WEBRTC)
webrtc_eventlog_host_(id_),
#endif
@@ -904,8 +904,6 @@ bool RenderProcessHostImpl::Init() {
ui::GpuSwitchingManager::GetInstance()->AddObserver(this);
}
- power_monitor_broadcaster_.Init();
-
is_initialized_ = true;
init_time_ = base::TimeTicks::Now();
return true;
@@ -1255,6 +1253,9 @@ void RenderProcessHostImpl::RegisterMojoInterfaces() {
base::Unretained(
BrowserMainLoop::GetInstance()->time_zone_monitor())));
+ AddUIThreadInterface(registry.get(),
+ base::Bind(&PowerMonitorMessageBroadcaster::Create));
+
scoped_refptr<base::SingleThreadTaskRunner> file_task_runner =
BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE);
registry->AddInterface(base::Bind(&MimeRegistryImpl::Create),
« no previous file with comments | « content/browser/renderer_host/render_process_host_impl.h ('k') | content/child/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698