Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(173)

Unified Diff: components/test_runner/test_runner.cc

Issue 1538803002: Migrates battery_status from content/renderer/ to WebKit/platform/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Synced. Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/test_runner/test_runner.h ('k') | components/test_runner/web_test_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/test_runner/test_runner.cc
diff --git a/components/test_runner/test_runner.cc b/components/test_runner/test_runner.cc
index 1c63ef632cb4d6bf4e175a107376bd43963c48f3..b55b4982e8dd613a990379aef4f7cd03ee64e63f 100644
--- a/components/test_runner/test_runner.cc
+++ b/components/test_runner/test_runner.cc
@@ -26,7 +26,6 @@
#include "gin/handle.h"
#include "gin/object_template_builder.h"
#include "gin/wrappable.h"
-#include "third_party/WebKit/public/platform/WebBatteryStatus.h"
#include "third_party/WebKit/public/platform/WebCanvas.h"
#include "third_party/WebKit/public/platform/WebData.h"
#include "third_party/WebKit/public/platform/WebPasswordCredential.h"
@@ -221,11 +220,6 @@ class TestRunnerBindings : public gin::Wrappable<TestRunnerBindings> {
void SetMockDeviceMotion(gin::Arguments* args);
void SetMockDeviceOrientation(gin::Arguments* args);
void SetMockScreenOrientation(const std::string& orientation);
- void DidChangeBatteryStatus(bool charging,
- double chargingTime,
- double dischargingTime,
- double level);
- void ResetBatteryStatus();
void DidAcquirePointerLock();
void DidNotAcquirePointerLock();
void DidLosePointerLock();
@@ -461,9 +455,6 @@ gin::ObjectTemplateBuilder TestRunnerBindings::GetObjectTemplateBuilder(
&TestRunnerBindings::SetMockDeviceOrientation)
.SetMethod("setMockScreenOrientation",
&TestRunnerBindings::SetMockScreenOrientation)
- .SetMethod("didChangeBatteryStatus",
- &TestRunnerBindings::DidChangeBatteryStatus)
- .SetMethod("resetBatteryStatus", &TestRunnerBindings::ResetBatteryStatus)
.SetMethod("didAcquirePointerLock",
&TestRunnerBindings::DidAcquirePointerLock)
.SetMethod("didNotAcquirePointerLock",
@@ -1020,21 +1011,6 @@ void TestRunnerBindings::SetMockScreenOrientation(
runner_->SetMockScreenOrientation(orientation);
}
-void TestRunnerBindings::DidChangeBatteryStatus(bool charging,
- double chargingTime,
- double dischargingTime,
- double level) {
- if (runner_) {
- runner_->DidChangeBatteryStatus(charging, chargingTime,
- dischargingTime, level);
- }
-}
-
-void TestRunnerBindings::ResetBatteryStatus() {
- if (runner_)
- runner_->ResetBatteryStatus();
-}
-
void TestRunnerBindings::DidAcquirePointerLock() {
if (runner_)
runner_->DidAcquirePointerLock();
@@ -1740,7 +1716,6 @@ void TestRunner::Reset() {
delegate_->SetBluetoothMockDataSet("");
delegate_->ClearGeofencingMockProvider();
delegate_->ResetPermissions();
- ResetBatteryStatus();
ResetDeviceLight();
}
@@ -2571,23 +2546,6 @@ void TestRunner::SetMockScreenOrientation(const std::string& orientation_str) {
delegate_->SetScreenOrientation(orientation);
}
-void TestRunner::DidChangeBatteryStatus(bool charging,
- double chargingTime,
- double dischargingTime,
- double level) {
- blink::WebBatteryStatus status;
- status.charging = charging;
- status.chargingTime = chargingTime;
- status.dischargingTime = dischargingTime;
- status.level = level;
- delegate_->DidChangeBatteryStatus(status);
-}
-
-void TestRunner::ResetBatteryStatus() {
- blink::WebBatteryStatus status;
- delegate_->DidChangeBatteryStatus(status);
-}
-
void TestRunner::DidAcquirePointerLock() {
DidAcquirePointerLockInternal();
}
« no previous file with comments | « components/test_runner/test_runner.h ('k') | components/test_runner/web_test_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698