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

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

Issue 457933002: Replace Chrome IPC with Mojo IPC for querying BatteryStatus service Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 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/common/battery_status_messages.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 0103ce7ebffa6b0f5281ed07a0c7c184b3a394ea..6374523e6f81a4d392b9ca25857c84aeecf29fab 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -40,7 +40,6 @@
#include "cc/base/switches.h"
#include "content/browser/appcache/appcache_dispatcher_host.h"
#include "content/browser/appcache/chrome_appcache_service.h"
-#include "content/browser/battery_status/battery_status_message_filter.h"
#include "content/browser/browser_child_process_host_impl.h"
#include "content/browser/browser_main.h"
#include "content/browser/browser_main_loop.h"
@@ -131,6 +130,7 @@
#include "content/public/common/result_codes.h"
#include "content/public/common/sandboxed_process_launcher_delegate.h"
#include "content/public/common/url_constants.h"
+#include "device/battery/battery_monitor_impl.h"
#include "gpu/command_buffer/service/gpu_switches.h"
#include "ipc/ipc_channel.h"
#include "ipc/ipc_logging.h"
@@ -580,6 +580,7 @@ bool RenderProcessHostImpl::Init() {
GetContentClient()->browser()->RenderProcessWillLaunch(this);
CreateMessageFilters();
+ RegisterMojoServices();
if (run_renderer_in_process()) {
DCHECK(g_renderer_main_thread_factory);
@@ -855,17 +856,20 @@ void RenderProcessHostImpl::CreateMessageFilters() {
AddFilter(new VibrationMessageFilter());
AddFilter(new PushMessagingMessageFilter(
GetID(), storage_partition_impl_->GetServiceWorkerContext()));
- AddFilter(new BatteryStatusMessageFilter());
#if defined(OS_ANDROID)
AddFilter(new ScreenOrientationMessageFilterAndroid());
#endif
}
+void RenderProcessHostImpl::RegisterMojoServices() {
+ mojo_application_host_->service_registry()->AddService(
+ base::Bind(&device::BatteryMonitorImpl::Create));
+}
+
int RenderProcessHostImpl::GetNextRoutingID() {
return widget_helper_->GetNextRoutingID();
}
-
void RenderProcessHostImpl::ResumeDeferredNavigation(
const GlobalRequestID& request_id) {
widget_helper_->ResumeDeferredNavigation(request_id);
« no previous file with comments | « content/browser/renderer_host/render_process_host_impl.h ('k') | content/common/battery_status_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698