|
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}
Committed: https://chromium.googlesource.com/chromium/src/+/663fd6d75da6a49f89485181bc7ce91463b39f91
Total comments: 16
Total comments: 6
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+151 lines, -236 lines) |
Patch |
|
M |
content/app/DEPS
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
1 chunk |
+0 lines, -1 line |
0 comments
|
Download
|
|
M |
content/browser/BUILD.gn
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
2 chunks |
+0 lines, -3 lines |
0 comments
|
Download
|
|
M |
content/browser/DEPS
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
1 chunk |
+0 lines, -1 line |
0 comments
|
Download
|
|
A |
content/browser/battery_status/DEPS
|
View
|
1
2
3
4
|
1 chunk |
+3 lines, -0 lines |
0 comments
|
Download
|
|
D |
content/browser/battery_status/battery_monitor_integration_browsertest.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
1 chunk |
+0 lines, -190 lines |
0 comments
|
Download
|
|
M |
content/browser/browser_main_loop.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
2 chunks |
+0 lines, -7 lines |
0 comments
|
Download
|
|
M |
content/browser/renderer_host/render_process_host_impl.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
3 chunks |
+0 lines, -6 lines |
0 comments
|
Download
|
|
M |
content/public/android/BUILD.gn
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
1 chunk |
+0 lines, -2 lines |
0 comments
|
Download
|
|
M |
content/public/android/java/src/org/chromium/content/browser/InterfaceRegistrarImpl.java
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
2 chunks |
+0 lines, -4 lines |
0 comments
|
Download
|
|
M |
content/public/app/mojo/content_browser_manifest.json
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
1 chunk |
+0 lines, -1 line |
0 comments
|
Download
|
|
M |
content/public/app/mojo/content_renderer_manifest.json
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
content/renderer/BUILD.gn
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
1 chunk |
+0 lines, -1 line |
0 comments
|
Download
|
|
M |
content/renderer/DEPS
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
1 chunk |
+0 lines, -1 line |
0 comments
|
Download
|
|
M |
content/test/BUILD.gn
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
1 chunk |
+0 lines, -1 line |
0 comments
|
Download
|
|
M |
device/battery/battery_monitor.mojom
|
View
|
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
|
M |
services/device/BUILD.gn
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
5 chunks |
+26 lines, -0 lines |
0 comments
|
Download
|
|
M |
services/device/DEPS
|
View
|
1
2
3
4
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
A |
services/device/android/java/src/org/chromium/services/device/InterfaceRegistrar.java
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
1 chunk |
+27 lines, -0 lines |
0 comments
|
Download
|
|
M |
services/device/device_service.h
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
4 chunks |
+23 lines, -0 lines |
0 comments
|
Download
|
|
M |
services/device/device_service.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
5 chunks |
+50 lines, -3 lines |
0 comments
|
Download
|
|
M |
services/device/manifest.json
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
third_party/WebKit/LayoutTests/battery-status/resources/mock-battery-monitor.js
|
View
|
1
2
3
4
|
2 chunks |
+11 lines, -12 lines |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/modules/battery/BUILD.gn
|
View
|
1
2
3
4
5
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/modules/battery/BatteryDispatcher.cpp
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
2 chunks |
+4 lines, -3 lines |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/modules/battery/DEPS
|
View
|
1
2
3
4
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
Depends on Patchset:
Total messages: 65 (46 generated)
|