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

Unified Diff: Source/modules/screen_orientation/LockOrientationCallback.cpp

Issue 400623004: Revert of Resolve screen.orientation.lock() promise with undefined. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 5 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
Index: Source/modules/screen_orientation/LockOrientationCallback.cpp
diff --git a/Source/modules/screen_orientation/LockOrientationCallback.cpp b/Source/modules/screen_orientation/LockOrientationCallback.cpp
index 1d6d58d953ba2cd251bd4bb34d4eaef003d29612..7eb294b183aa31a63129b00b99137a3e6ea135fe 100644
--- a/Source/modules/screen_orientation/LockOrientationCallback.cpp
+++ b/Source/modules/screen_orientation/LockOrientationCallback.cpp
@@ -21,9 +21,12 @@
{
}
-void LockOrientationCallback::onSuccess()
+void LockOrientationCallback::onSuccess(unsigned angle, blink::WebScreenOrientationType type)
{
- m_resolver->resolve();
+ // FIXME: for the moment, we do nothing with the angle, we should use it and
+ // convert it to the appropriate type if the type == 'undefined' when the
+ // method will be implemented in ScreenOrientationController.
+ m_resolver->resolve(ScreenOrientation::orientationTypeToString(type));
}
void LockOrientationCallback::onError(blink::WebLockOrientationError error)
« no previous file with comments | « Source/modules/screen_orientation/LockOrientationCallback.h ('k') | public/platform/WebLockOrientationCallback.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698