New issue
Advanced search Search tips

Issue 678920 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Mar 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Task

Blocked on:
issue 680936
issue 689385

Blocking:
issue 612328
issue 684422
issue 686011



Sign in to add a comment

Port Battery Status Mojo interface from being hosted by content_browser to being hosted by Device Service

Project Member Reported by blundell@chromium.org, Jan 6 2017

Issue description

As part of the Content Modularization Project, the BatteryStatus Mojo interface should be extracted from being hosted by //content/browser into being hosted in the Device Service.
 
Summary: Content Modularization Project: Battery Status (was: Extract Battery Status from //content into Device Service)
Blockedon: 680936
Blocking: 684422
Status: Started (was: Assigned)
Labels: DeviceService
Summary: Port Battery Status Mojo interface from being hosted by content_browser to being hosted by Device Service (was: Content Modularization Project: Battery Status)
Note that as part of (or immediately after) the port of the hosting, the Mojo interfaces themselves should be moved from //device/battery to //services/device/public/interfaces.
Blockedon: 689385

Comment 9 by leon....@intel.com, Feb 16 2017

Blocking: 686011
Project Member

Comment 10 by bugdroid1@chromium.org, Mar 23 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/663fd6d75da6a49f89485181bc7ce91463b39f91

commit 663fd6d75da6a49f89485181bc7ce91463b39f91
Author: blundell <blundell@chromium.org>
Date: Thu Mar 23 15:21:41 2017

Port BatteryMonitor into Device Service

This CL ports the BatteryMonitor Mojo interface from being hosted in
//content/browser to being hosted in the Device Service.

Of particular interest:

- Adds the ability for the Device Service to register interfaces in
  Java, taking the lead of //content/browser but being more simple as
  //content/browser is designed to allow an embedder to register
  such interfaces as well.
- Moves BatteryStatusService shutdown from BrowserMainLoop to the
  Device Service destructor. This has the concrete impact of moving
  this code to being called on Mojo shutdown, which is slightly earlier
  in BrowserMainLoop::ShutdownThreadsAndCleanUp() than it was
  previously being called.
- Eliminates the BatteryMonitorIntegration browsertests. These tests
  inject a dummy BatteryMonitor implementation and test that this
  dummy implementation is correctly exposed to the renderer. Injecting
  a dummy implementation into the Device Service from //content/browser
  is non-trivial, and the functionality being tested is already covered
  by the BatteryMonitorImpl browsertests, which remain.

BUG= 678920 ,  680936 
TEST=Visit http://pazguille.github.io/demo-battery-api/ and check that
     the information being displayed is correct.

Review-Url: https://codereview.chromium.org/2643713002
Cr-Commit-Position: refs/heads/master@{#459089}

[modify] https://crrev.com/663fd6d75da6a49f89485181bc7ce91463b39f91/content/app/DEPS
[modify] https://crrev.com/663fd6d75da6a49f89485181bc7ce91463b39f91/content/browser/BUILD.gn
[modify] https://crrev.com/663fd6d75da6a49f89485181bc7ce91463b39f91/content/browser/DEPS
[add] https://crrev.com/663fd6d75da6a49f89485181bc7ce91463b39f91/content/browser/battery_status/DEPS
[delete] https://crrev.com/b1087165c06ad1d860f4cab75f575a967814b2a5/content/browser/battery_status/battery_monitor_integration_browsertest.cc
[modify] https://crrev.com/663fd6d75da6a49f89485181bc7ce91463b39f91/content/browser/browser_main_loop.cc
[modify] https://crrev.com/663fd6d75da6a49f89485181bc7ce91463b39f91/content/browser/renderer_host/render_process_host_impl.cc
[modify] https://crrev.com/663fd6d75da6a49f89485181bc7ce91463b39f91/content/public/android/BUILD.gn
[modify] https://crrev.com/663fd6d75da6a49f89485181bc7ce91463b39f91/content/public/android/java/src/org/chromium/content/browser/InterfaceRegistrarImpl.java
[modify] https://crrev.com/663fd6d75da6a49f89485181bc7ce91463b39f91/content/public/app/mojo/content_browser_manifest.json
[modify] https://crrev.com/663fd6d75da6a49f89485181bc7ce91463b39f91/content/public/app/mojo/content_renderer_manifest.json
[modify] https://crrev.com/663fd6d75da6a49f89485181bc7ce91463b39f91/content/renderer/BUILD.gn
[modify] https://crrev.com/663fd6d75da6a49f89485181bc7ce91463b39f91/content/renderer/DEPS
[modify] https://crrev.com/663fd6d75da6a49f89485181bc7ce91463b39f91/content/test/BUILD.gn
[modify] https://crrev.com/663fd6d75da6a49f89485181bc7ce91463b39f91/device/battery/battery_monitor.mojom
[modify] https://crrev.com/663fd6d75da6a49f89485181bc7ce91463b39f91/services/device/BUILD.gn
[modify] https://crrev.com/663fd6d75da6a49f89485181bc7ce91463b39f91/services/device/DEPS
[add] https://crrev.com/663fd6d75da6a49f89485181bc7ce91463b39f91/services/device/android/java/src/org/chromium/services/device/InterfaceRegistrar.java
[modify] https://crrev.com/663fd6d75da6a49f89485181bc7ce91463b39f91/services/device/device_service.cc
[modify] https://crrev.com/663fd6d75da6a49f89485181bc7ce91463b39f91/services/device/device_service.h
[modify] https://crrev.com/663fd6d75da6a49f89485181bc7ce91463b39f91/services/device/manifest.json
[modify] https://crrev.com/663fd6d75da6a49f89485181bc7ce91463b39f91/third_party/WebKit/LayoutTests/battery-status/resources/mock-battery-monitor.js
[modify] https://crrev.com/663fd6d75da6a49f89485181bc7ce91463b39f91/third_party/WebKit/Source/modules/battery/BUILD.gn
[modify] https://crrev.com/663fd6d75da6a49f89485181bc7ce91463b39f91/third_party/WebKit/Source/modules/battery/BatteryDispatcher.cpp
[modify] https://crrev.com/663fd6d75da6a49f89485181bc7ce91463b39f91/third_party/WebKit/Source/modules/battery/DEPS

Status: Fixed (was: Started)
Components: Internals>Services>Device
Labels: Type-Task
Migrating S13N meta bugs to Type=Task, so that they can be distinguished from technical work.

Sign in to add a comment