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

Unified Diff: third_party/WebKit/Source/modules/device_orientation/DeviceOrientationInspectorAgent.cpp

Issue 2474743002: [DevTools] migrate DOMDebugger, Input, DeviceOrientation, Tracing to new style (Closed)
Patch Set: rebased Created 4 years, 1 month 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
Index: third_party/WebKit/Source/modules/device_orientation/DeviceOrientationInspectorAgent.cpp
diff --git a/third_party/WebKit/Source/modules/device_orientation/DeviceOrientationInspectorAgent.cpp b/third_party/WebKit/Source/modules/device_orientation/DeviceOrientationInspectorAgent.cpp
index 0117c96c6736eea467226c7e058ab269f03424e0..0eaf63e5512970227f9a4768091120b40b4305d1 100644
--- a/third_party/WebKit/Source/modules/device_orientation/DeviceOrientationInspectorAgent.cpp
+++ b/third_party/WebKit/Source/modules/device_orientation/DeviceOrientationInspectorAgent.cpp
@@ -41,8 +41,7 @@ DeviceOrientationController& DeviceOrientationInspectorAgent::controller() {
*m_page->deprecatedLocalMainFrame()->document());
}
-void DeviceOrientationInspectorAgent::setDeviceOrientationOverride(
- ErrorString* error,
+Response DeviceOrientationInspectorAgent::setDeviceOrientationOverride(
double alpha,
double beta,
double gamma) {
@@ -53,19 +52,21 @@ void DeviceOrientationInspectorAgent::setDeviceOrientationOverride(
m_state->setDouble(DeviceOrientationInspectorAgentState::gamma, gamma);
controller().setOverride(
DeviceOrientationData::create(alpha, beta, gamma, false));
+ return Response::OK();
}
-void DeviceOrientationInspectorAgent::clearDeviceOrientationOverride(
- ErrorString* error) {
+Response DeviceOrientationInspectorAgent::clearDeviceOrientationOverride() {
m_state->setBoolean(DeviceOrientationInspectorAgentState::overrideEnabled,
false);
controller().clearOverride();
+ return Response::OK();
}
-void DeviceOrientationInspectorAgent::disable(ErrorString*) {
+Response DeviceOrientationInspectorAgent::disable() {
m_state->setBoolean(DeviceOrientationInspectorAgentState::overrideEnabled,
false);
controller().clearOverride();
+ return Response::OK();
}
void DeviceOrientationInspectorAgent::restore() {

Powered by Google App Engine
This is Rietveld 408576698