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

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
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 149a40ca3b8bd54c63e5646e09e4c6aad7d38f75..f1e419bd4f48ee3adccd2cdfa19adb03307b1026 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"
@@ -684,7 +685,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
@@ -924,8 +924,6 @@ bool RenderProcessHostImpl::Init() {
ui::GpuSwitchingManager::GetInstance()->AddObserver(this);
}
- power_monitor_broadcaster_.Init();
-
is_initialized_ = true;
init_time_ = base::TimeTicks::Now();
return true;
@@ -1282,6 +1280,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),

Powered by Google App Engine
This is Rietveld 408576698