New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 680936 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Mar 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug

Blocking:
issue 678920



Sign in to add a comment

Servicification: Generalize //content's Java interface registration mechanism to make it usable by other services

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

Issue description

The Java interfaces that //content registers in InterfaceRegistrarImpl.java are all slated to be ported to the Device Service. To enable this porting, I plan to generalize //content's Java interface registration mechanism, as described in https://docs.google.com/document/d/126Ol8vpiYYUZmJibZPEqIpz4IcnqH5osJIs2IUSMM3w/edit#heading=h.pbhuajhebt5y.

I plan to start on this work in the near term; please let me know if my approach duplicates or conflicts with efforts that anyone else is making.
 
Labels: DeviceService
Status: Started (was: Assigned)
Project Member

Comment 3 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

Sign in to add a comment