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 dec2d18f5d250c15539ddaa7c7a368aad2a2e26a..8617b7ef9e4010873cdd9d41751317256e24ccee 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" |
@@ -4517,6 +4518,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) |