 Chromium Code Reviews
 Chromium Code Reviews Issue 1538803002:
  Migrates battery_status from content/renderer/ to WebKit/platform/  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/src.git@master
    
  
    Issue 1538803002:
  Migrates battery_status from content/renderer/ to WebKit/platform/  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/src.git@master| Index: third_party/WebKit/Source/web/WebViewImpl.cpp | 
| diff --git a/third_party/WebKit/Source/web/WebViewImpl.cpp b/third_party/WebKit/Source/web/WebViewImpl.cpp | 
| index e390f65c133053acb95835af5db9f7b6406b5f99..6022df003420d5ca39ff7743bd1364e4c6d03fd0 100644 | 
| --- a/third_party/WebKit/Source/web/WebViewImpl.cpp | 
| +++ b/third_party/WebKit/Source/web/WebViewImpl.cpp | 
| @@ -92,6 +92,7 @@ | 
| #include "core/timing/Performance.h" | 
| #include "modules/accessibility/AXObject.h" | 
| #include "modules/accessibility/AXObjectCacheImpl.h" | 
| +#include "modules/battery/BatteryDispatcher.h" | 
| #include "modules/credentialmanager/CredentialManagerClient.h" | 
| #include "modules/encryptedmedia/MediaKeysController.h" | 
| #include "modules/storage/StorageNamespaceController.h" | 
| @@ -4526,6 +4527,17 @@ void WebViewImpl::forceNextDrawingBufferCreationToFail() | 
| DrawingBuffer::forceNextDrawingBufferCreationToFail(); | 
| } | 
| +void WebViewImpl::updateBatteryStatusForTesting(bool charging, double chargingTime, double dischargingTime, double level) | 
| +{ | 
| + BatteryDispatcher::instance().OnUpdateBatteryStatus( | 
| 
esprehn
2016/02/18 06:48:13
This should be exposed in the platform API, not th
 
haraken
2016/02/18 11:38:04
Just to confirm: Do you mean public/web/? This is
 | 
| + BatteryStatus(charging, chargingTime, dischargingTime, level)); | 
| +} | 
| + | 
| +void WebViewImpl::resetBatteryStatusForTesting() | 
| 
esprehn
2016/02/18 06:48:13
Ditto
 | 
| +{ | 
| + BatteryDispatcher::instance().OnUpdateBatteryStatus(BatteryStatus()); | 
| +} | 
| + | 
| void WebViewImpl::updatePageOverlays() | 
| { | 
| if (m_pageColorOverlay) |