Index: public/platform/Platform.h |
diff --git a/public/platform/Platform.h b/public/platform/Platform.h |
index f2e79d66c03d00877a3b1b66682f1ed50092274a..11ab36e3708f5b2923c0760525fa1e038ddf5c6b 100644 |
--- a/public/platform/Platform.h |
+++ b/public/platform/Platform.h |
@@ -36,13 +36,16 @@ |
#endif |
#include "WebAudioDevice.h" |
+#include "WebCallbacks.h" |
#include "WebCommon.h" |
+#include "WebDOMException.h" |
#include "WebData.h" |
#include "WebGamepadListener.h" |
#include "WebGamepads.h" |
#include "WebGraphicsContext3D.h" |
#include "WebLocalizedString.h" |
#include "WebScreenOrientationLockType.h" |
+#include "WebScreenOrientationType.h" |
#include "WebSpeechSynthesizer.h" |
#include "WebStorageQuotaCallbacks.h" |
#include "WebStorageQuotaType.h" |
@@ -632,8 +635,16 @@ public: |
// Screen Orientation ------------------------------------------------- |
+ typedef WebCallbacks<blink::WebScreenOrientationType, blink::WebDOMException> WebLockOrientationCallback; |
virtual void setScreenOrientationListener(blink::WebScreenOrientationListener*) { } |
virtual void lockOrientation(WebScreenOrientationLockType) { } |
+ // Request a screen orientation lock and pass a |callback| object to be used |
+ // to notify of success/failure. The |callback| parameter is expected to be |
+ // owned by the implementation. |
+ virtual void lockOrientation(WebScreenOrientationLockType, WebLockOrientationCallback* callback) |
+ { |
+ delete callback; // prevents memory leak if there is no implementation. |
+ } |
virtual void unlockOrientation() { } |