New issue
Advanced search Search tips

Issue 684422 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: May 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Bug

Blocked on:
issue 678920
issue 686011

Blocking:
issue 612328



Sign in to add a comment

Expose battery monitoring solely via the Device Service

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

Issue description

Browser process code uses //device/battery directly (e.g., //chrome). These clients should be converted to instead consume battery information via the Mojo interface provided by the Device Service.

Once this is completed, //device/battery should be moved to //services/device/battery and made visible (in the GN sense) only to //services/device. That is, it should become completely and only part of the implementation of the Device Service. 
 
Labels: DeviceService
Summary: Device Service: Transform //device/battery to be only part of the internal implementation of the Device Service (was: Device Service: Eliminate browser process dependencies on //device/battery)
Blockedon: 686011
Summary: Device Service: Expose battery monitoring solely via the Device Service (was: Device Service: Transform //device/battery to be only part of the internal implementation of the Device Service)
Summary: Expose battery monitoring solely via the Device Service (was: Device Service: Expose battery monitoring solely via the Device Service)

Comment 6 by leon....@intel.com, Apr 7 2017

Owner: leon....@intel.com
Status: Started (was: Available)
Project Member

Comment 7 by bugdroid1@chromium.org, Apr 8 2017

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

commit 6ff361f672aceea93e56d10189c7a2f150dcf415
Author: leon.han <leon.han@intel.com>
Date: Sat Apr 08 02:54:31 2017

Add '.mojom' suffix for battery mojom modules.

This is to prepare for moving all battery codes from
//device/battery/ into //services/device/battery/.

BUG= 684422 
TBR=rockot@chromium.org
for mechanical changes in services/device/

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

[modify] https://crrev.com/6ff361f672aceea93e56d10189c7a2f150dcf415/content/browser/battery_status/battery_monitor_impl_browsertest.cc
[modify] https://crrev.com/6ff361f672aceea93e56d10189c7a2f150dcf415/device/battery/android/java/src/org/chromium/device/battery/BatteryMonitorFactory.java
[modify] https://crrev.com/6ff361f672aceea93e56d10189c7a2f150dcf415/device/battery/android/java/src/org/chromium/device/battery/BatteryMonitorImpl.java
[modify] https://crrev.com/6ff361f672aceea93e56d10189c7a2f150dcf415/device/battery/android/java/src/org/chromium/device/battery/BatteryStatusManager.java
[modify] https://crrev.com/6ff361f672aceea93e56d10189c7a2f150dcf415/device/battery/android/javatests/src/org/chromium/device/battery/BatteryStatusManagerTest.java
[modify] https://crrev.com/6ff361f672aceea93e56d10189c7a2f150dcf415/device/battery/battery_monitor.mojom
[modify] https://crrev.com/6ff361f672aceea93e56d10189c7a2f150dcf415/device/battery/battery_monitor_impl.cc
[modify] https://crrev.com/6ff361f672aceea93e56d10189c7a2f150dcf415/device/battery/battery_monitor_impl.h
[modify] https://crrev.com/6ff361f672aceea93e56d10189c7a2f150dcf415/device/battery/battery_status.mojom
[modify] https://crrev.com/6ff361f672aceea93e56d10189c7a2f150dcf415/device/battery/battery_status_manager_chromeos.cc
[modify] https://crrev.com/6ff361f672aceea93e56d10189c7a2f150dcf415/device/battery/battery_status_manager_linux.cc
[modify] https://crrev.com/6ff361f672aceea93e56d10189c7a2f150dcf415/device/battery/battery_status_manager_linux_unittest.cc
[modify] https://crrev.com/6ff361f672aceea93e56d10189c7a2f150dcf415/device/battery/battery_status_manager_mac.cc
[modify] https://crrev.com/6ff361f672aceea93e56d10189c7a2f150dcf415/device/battery/battery_status_manager_win.cc
[modify] https://crrev.com/6ff361f672aceea93e56d10189c7a2f150dcf415/device/battery/battery_status_manager_win.h
[modify] https://crrev.com/6ff361f672aceea93e56d10189c7a2f150dcf415/device/battery/battery_status_manager_win_unittest.cc
[modify] https://crrev.com/6ff361f672aceea93e56d10189c7a2f150dcf415/device/battery/battery_status_service.cc
[modify] https://crrev.com/6ff361f672aceea93e56d10189c7a2f150dcf415/device/battery/battery_status_service.h
[modify] https://crrev.com/6ff361f672aceea93e56d10189c7a2f150dcf415/device/battery/battery_status_service_unittest.cc
[modify] https://crrev.com/6ff361f672aceea93e56d10189c7a2f150dcf415/services/device/android/java/src/org/chromium/services/device/InterfaceRegistrar.java
[modify] https://crrev.com/6ff361f672aceea93e56d10189c7a2f150dcf415/services/device/device_service.cc
[modify] https://crrev.com/6ff361f672aceea93e56d10189c7a2f150dcf415/services/device/device_service.h
[modify] https://crrev.com/6ff361f672aceea93e56d10189c7a2f150dcf415/services/device/manifest.json
[modify] https://crrev.com/6ff361f672aceea93e56d10189c7a2f150dcf415/third_party/WebKit/Source/modules/battery/BatteryDispatcher.cpp
[modify] https://crrev.com/6ff361f672aceea93e56d10189c7a2f150dcf415/third_party/WebKit/Source/modules/battery/BatteryDispatcher.h

Project Member

Comment 8 by bugdroid1@chromium.org, Apr 25 2017

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

commit b3592f9117184c7f54aeff8fcbe9d0d67ab11dc0
Author: leon.han <leon.han@intel.com>
Date: Tue Apr 25 00:17:31 2017

[DeviceService] Replace content browser test with service test for BatteryMonitorImpl

This CL removes BatteryMonitorImpl content browser test, its renderer
side test is covered by existing battery layout tests, and its browser
side test is covered by the service test newly created in this CL.

Thus we can eliminate the direct dependency on battery from content
layer, then we can hide all battery monitor impl inside Device Service
with a follow-up CL.

BUG= 684422 
TEST=service_unittest
TBR=timvolodine@chromium.org

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

[delete] https://crrev.com/e33d2a5b01ecfcb5695bce2e1fa92d13c9b4265a/content/browser/battery_status/DEPS
[delete] https://crrev.com/e33d2a5b01ecfcb5695bce2e1fa92d13c9b4265a/content/browser/battery_status/OWNERS
[delete] https://crrev.com/e33d2a5b01ecfcb5695bce2e1fa92d13c9b4265a/content/browser/battery_status/battery_monitor_impl_browsertest.cc
[modify] https://crrev.com/b3592f9117184c7f54aeff8fcbe9d0d67ab11dc0/content/test/BUILD.gn
[delete] https://crrev.com/e33d2a5b01ecfcb5695bce2e1fa92d13c9b4265a/content/test/data/battery_status/battery_status_default_test.html
[delete] https://crrev.com/e33d2a5b01ecfcb5695bce2e1fa92d13c9b4265a/content/test/data/battery_status/battery_status_event_listener_test.html
[delete] https://crrev.com/e33d2a5b01ecfcb5695bce2e1fa92d13c9b4265a/content/test/data/battery_status/battery_status_manual_test.html
[delete] https://crrev.com/e33d2a5b01ecfcb5695bce2e1fa92d13c9b4265a/content/test/data/battery_status/battery_status_promise_resolution_test.html
[modify] https://crrev.com/b3592f9117184c7f54aeff8fcbe9d0d67ab11dc0/device/battery/battery_status_service.cc
[modify] https://crrev.com/b3592f9117184c7f54aeff8fcbe9d0d67ab11dc0/services/device/BUILD.gn
[add] https://crrev.com/b3592f9117184c7f54aeff8fcbe9d0d67ab11dc0/services/device/battery/OWNERS
[add] https://crrev.com/b3592f9117184c7f54aeff8fcbe9d0d67ab11dc0/services/device/battery/battery_monitor_impl_unittest.cc
[modify] https://crrev.com/b3592f9117184c7f54aeff8fcbe9d0d67ab11dc0/services/device/unittest_manifest.json

Project Member

Comment 9 by bugdroid1@chromium.org, May 3 2017

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

commit cb374e8d7a568886dd2bbf469c67f91de19fa4f3
Author: leon.han <leon.han@intel.com>
Date: Wed May 03 05:22:20 2017

[DeviceService] Expose battery monitoring solely via the Device Service

This CL makes battery impl be completely only part of the implementation
of the Device Service.
  - Moves //device/battery to //services/device/battery
  - Makes //services/device/battery visible in GN only to
    //services/device

BUG= 684422 
TBR=stevenjb@chromium.org, tsepez@chromium.org, boliu@chromium.org

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

[modify] https://crrev.com/cb374e8d7a568886dd2bbf469c67f91de19fa4f3/android_webview/native/BUILD.gn
[modify] https://crrev.com/cb374e8d7a568886dd2bbf469c67f91de19fa4f3/chrome/browser/BUILD.gn
[modify] https://crrev.com/cb374e8d7a568886dd2bbf469c67f91de19fa4f3/chrome/browser/DEPS
[modify] https://crrev.com/cb374e8d7a568886dd2bbf469c67f91de19fa4f3/chrome/test/BUILD.gn
[modify] https://crrev.com/cb374e8d7a568886dd2bbf469c67f91de19fa4f3/device/BUILD.gn
[delete] https://crrev.com/abed2a56f122e7d6ca95e37a42c0c14b73a85a35/device/battery/OWNERS
[delete] https://crrev.com/abed2a56f122e7d6ca95e37a42c0c14b73a85a35/device/battery/battery_export.h
[modify] https://crrev.com/cb374e8d7a568886dd2bbf469c67f91de19fa4f3/services/device/BUILD.gn
[rename] https://crrev.com/cb374e8d7a568886dd2bbf469c67f91de19fa4f3/services/device/battery/BUILD.gn
[rename] https://crrev.com/cb374e8d7a568886dd2bbf469c67f91de19fa4f3/services/device/battery/DEPS
[rename] https://crrev.com/cb374e8d7a568886dd2bbf469c67f91de19fa4f3/services/device/battery/android/BUILD.gn
[rename] https://crrev.com/cb374e8d7a568886dd2bbf469c67f91de19fa4f3/services/device/battery/android/java/src/org/chromium/device/battery/BatteryMonitorFactory.java
[rename] https://crrev.com/cb374e8d7a568886dd2bbf469c67f91de19fa4f3/services/device/battery/android/java/src/org/chromium/device/battery/BatteryMonitorImpl.java
[rename] https://crrev.com/cb374e8d7a568886dd2bbf469c67f91de19fa4f3/services/device/battery/android/java/src/org/chromium/device/battery/BatteryStatusManager.java
[rename] https://crrev.com/cb374e8d7a568886dd2bbf469c67f91de19fa4f3/services/device/battery/android/javatests/src/org/chromium/device/battery/BatteryStatusManagerTest.java
[rename] https://crrev.com/cb374e8d7a568886dd2bbf469c67f91de19fa4f3/services/device/battery/battery_monitor_impl.cc
[rename] https://crrev.com/cb374e8d7a568886dd2bbf469c67f91de19fa4f3/services/device/battery/battery_monitor_impl.h
[modify] https://crrev.com/cb374e8d7a568886dd2bbf469c67f91de19fa4f3/services/device/battery/battery_monitor_impl_unittest.cc
[rename] https://crrev.com/cb374e8d7a568886dd2bbf469c67f91de19fa4f3/services/device/battery/battery_status_manager.h
[rename] https://crrev.com/cb374e8d7a568886dd2bbf469c67f91de19fa4f3/services/device/battery/battery_status_manager_chromeos.cc
[rename] https://crrev.com/cb374e8d7a568886dd2bbf469c67f91de19fa4f3/services/device/battery/battery_status_manager_default.cc
[rename] https://crrev.com/cb374e8d7a568886dd2bbf469c67f91de19fa4f3/services/device/battery/battery_status_manager_linux-inl.h
[rename] https://crrev.com/cb374e8d7a568886dd2bbf469c67f91de19fa4f3/services/device/battery/battery_status_manager_linux.cc
[rename] https://crrev.com/cb374e8d7a568886dd2bbf469c67f91de19fa4f3/services/device/battery/battery_status_manager_linux.h
[rename] https://crrev.com/cb374e8d7a568886dd2bbf469c67f91de19fa4f3/services/device/battery/battery_status_manager_linux_unittest.cc
[rename] https://crrev.com/cb374e8d7a568886dd2bbf469c67f91de19fa4f3/services/device/battery/battery_status_manager_mac.cc
[rename] https://crrev.com/cb374e8d7a568886dd2bbf469c67f91de19fa4f3/services/device/battery/battery_status_manager_win.cc
[rename] https://crrev.com/cb374e8d7a568886dd2bbf469c67f91de19fa4f3/services/device/battery/battery_status_manager_win.h
[rename] https://crrev.com/cb374e8d7a568886dd2bbf469c67f91de19fa4f3/services/device/battery/battery_status_manager_win_unittest.cc
[rename] https://crrev.com/cb374e8d7a568886dd2bbf469c67f91de19fa4f3/services/device/battery/battery_status_service.cc
[rename] https://crrev.com/cb374e8d7a568886dd2bbf469c67f91de19fa4f3/services/device/battery/battery_status_service.h
[rename] https://crrev.com/cb374e8d7a568886dd2bbf469c67f91de19fa4f3/services/device/battery/battery_status_service_unittest.cc
[modify] https://crrev.com/cb374e8d7a568886dd2bbf469c67f91de19fa4f3/services/device/device_service.cc
[modify] https://crrev.com/cb374e8d7a568886dd2bbf469c67f91de19fa4f3/services/device/device_service.h
[modify] https://crrev.com/cb374e8d7a568886dd2bbf469c67f91de19fa4f3/services/device/public/interfaces/BUILD.gn
[rename] https://crrev.com/cb374e8d7a568886dd2bbf469c67f91de19fa4f3/services/device/public/interfaces/battery_monitor.mojom
[rename] https://crrev.com/cb374e8d7a568886dd2bbf469c67f91de19fa4f3/services/device/public/interfaces/battery_status.mojom
[modify] https://crrev.com/cb374e8d7a568886dd2bbf469c67f91de19fa4f3/third_party/WebKit/LayoutTests/battery-status/resources/mock-battery-monitor.js
[modify] https://crrev.com/cb374e8d7a568886dd2bbf469c67f91de19fa4f3/third_party/WebKit/Source/modules/battery/BUILD.gn
[modify] https://crrev.com/cb374e8d7a568886dd2bbf469c67f91de19fa4f3/third_party/WebKit/Source/modules/battery/BatteryDispatcher.h
[modify] https://crrev.com/cb374e8d7a568886dd2bbf469c67f91de19fa4f3/third_party/WebKit/Source/modules/battery/DEPS

Status: Fixed (was: Started)
Components: Internals>Services>Device

Sign in to add a comment