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 25425dba1f6767ca3eb533c643c3e6599076899d..b848a9c4caa7710c2de54df9abee6080cc64967e 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" |
@@ -4584,6 +4585,17 @@ void WebViewImpl::forceNextDrawingBufferCreationToFail() |
DrawingBuffer::forceNextDrawingBufferCreationToFail(); |
} |
+void WebViewImpl::updateBatteryStatusForTesting(bool charging, double chargingTime, double dischargingTime, double level) |
+{ |
+ BatteryDispatcher::instance().onUpdateBatteryStatus( |
+ BatteryStatus(charging, chargingTime, dischargingTime, level)); |
+} |
+ |
+void WebViewImpl::resetBatteryStatusForTesting() |
+{ |
+ BatteryDispatcher::instance().onUpdateBatteryStatus(BatteryStatus()); |
+} |
+ |
void WebViewImpl::updatePageOverlays() |
{ |
if (m_pageColorOverlay) |