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.
TEST=Visit http://pazguille.github.io/demo-battery-api/ and check that
the information being displayed is correct.
25 files changed