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

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

Issue 346543003: Remove WebLockOrientationCallback::ErrorType (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@split_up_callback_errors
Patch Set: Created 6 years, 6 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 da1088309d82ba691d4186d34dd4642c770157bb..407d4fa6fd357444ea0194d297e0f51416b34232 100644
--- a/Source/modules/screen_orientation/LockOrientationCallback.cpp
+++ b/Source/modules/screen_orientation/LockOrientationCallback.cpp
@@ -29,29 +29,6 @@ void LockOrientationCallback::onSuccess(unsigned angle, blink::WebScreenOrientat
m_resolver->resolve(ScreenOrientation::orientationTypeToString(type));
}
-void LockOrientationCallback::onError(ErrorType error)
-{
- ExceptionCode code = 0;
- String msg = "";
-
- switch (error) {
- case ErrorTypeNotAvailable:
- code = NotSupportedError;
- msg = "lockOrientation() is not available on this device.";
- break;
- case ErrorTypeFullScreenRequired:
- code = SecurityError;
- msg = "The page needs to be fullscreen in order to call lockOrientation().";
- break;
- case ErrorTypeCanceled:
- code = AbortError;
- msg = "A call to lockOrientation() or unlockOrientation() canceled this call.";
- break;
- }
-
- m_resolver->reject(DOMException::create(code, msg));
-}
-
void LockOrientationCallback::onError(blink::WebLockOrientationError error)
{
ExceptionCode code = 0;
« 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