Index: Source/modules/screen_orientation/LockOrientationCallback.h |
diff --git a/Source/modules/screen_orientation/LockOrientationCallback.h b/Source/modules/screen_orientation/LockOrientationCallback.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..37f4f7baf9142c749ae45cbda9d5d877f9fed58e |
--- /dev/null |
+++ b/Source/modules/screen_orientation/LockOrientationCallback.h |
@@ -0,0 +1,38 @@ |
+// Copyright 2014 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef LockOrientationCallback_h |
+#define LockOrientationCallback_h |
+ |
+#include "public/platform/WebCallbacks.h" |
+#include "public/platform/WebScreenOrientationType.h" |
+#include "wtf/Noncopyable.h" |
+#include "wtf/PassRefPtr.h" |
+#include "wtf/RefPtr.h" |
+ |
+namespace blink { |
+class WebDOMException; |
+} |
+ |
+namespace WebCore { |
+ |
+class ScriptPromiseResolverWithContext; |
+ |
+class LockOrientationCallback FINAL : public blink::WebCallbacks<blink::WebScreenOrientationType, blink::WebDOMException> { |
Inactive
2014/05/16 13:25:26
Looks like we could reuse CallbackPromiseAdapter ?
mlamouri (slow - plz ping)
2014/05/21 13:45:02
That would require me to have a wrapper for WebScr
Inactive
2014/05/21 13:48:07
I don't understand, why cannot we use CallbackProm
|
+public: |
+ LockOrientationCallback(PassRefPtr<ScriptPromiseResolverWithContext>); |
+ virtual ~LockOrientationCallback(); |
+ |
+ virtual void onSuccess(blink::WebScreenOrientationType*) OVERRIDE; |
+ virtual void onError(blink::WebDOMException*) OVERRIDE; |
+ |
+private: |
+ RefPtr<ScriptPromiseResolverWithContext> m_resolver; |
+ WTF_MAKE_NONCOPYABLE(LockOrientationCallback); |
+}; |
+ |
+} // namespace WebCore |
+ |
+#endif // LockOrientationCallback_h |
+ |