Chromium Code Reviews| Index: Source/modules/screen_orientation/ScreenOrientation.h |
| diff --git a/Source/modules/screen_orientation/ScreenOrientation.h b/Source/modules/screen_orientation/ScreenOrientation.h |
| index 72e04c8a9ebfff62114a4e60e05b693ced034bc6..5369f58fdb7531d8d964893b14bfb1be3ad7b9f0 100644 |
| --- a/Source/modules/screen_orientation/ScreenOrientation.h |
| +++ b/Source/modules/screen_orientation/ScreenOrientation.h |
| @@ -10,14 +10,16 @@ |
| #include "platform/Timer.h" |
| #include "platform/heap/Handle.h" |
| #include "public/platform/WebScreenOrientationLockType.h" |
| +#include "public/platform/WebScreenOrientationType.h" |
| #include "wtf/text/AtomicString.h" |
| #include "wtf/text/WTFString.h" |
| namespace WebCore { |
| class Document; |
| -class ExceptionState; |
| +class ExecutionContext; |
| class Screen; |
| +class ScriptPromise; |
|
yhirano
2014/05/22 03:48:43
I think this forward declaration is meaningless be
mlamouri (slow - plz ping)
2014/05/22 08:58:56
The forward declaration appears to be needed. It d
|
| class ScreenOrientation FINAL : public NoBaseWillBeGarbageCollectedFinalized<ScreenOrientation>, public WillBeHeapSupplement<Screen>, DOMWindowProperty { |
| WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(ScreenOrientation); |
| @@ -26,22 +28,19 @@ public: |
| virtual ~ScreenOrientation(); |
| static const AtomicString& orientation(Screen&); |
| - static bool lockOrientation(Screen&, const AtomicString& orientation, ExceptionState&); |
| + static ScriptPromise lockOrientation(ExecutionContext*, Screen&, const AtomicString& orientation); |
| static void unlockOrientation(Screen&); |
| + // Helper being used by this class and LockOrientationCallback. |
| + static const AtomicString& orientationTypeToString(blink::WebScreenOrientationType); |
| + |
| virtual void trace(Visitor* visitor) OVERRIDE { WillBeHeapSupplement<Screen>::trace(visitor); } |
| private: |
| explicit ScreenOrientation(Screen&); |
| - void lockOrientationAsync(blink::WebScreenOrientationLockType); |
| - void orientationLockTimerFired(Timer<ScreenOrientation>*); |
| - |
| static const char* supplementName(); |
| Document* document() const; |
| - |
| - Timer<ScreenOrientation> m_orientationLockTimer; |
| - blink::WebScreenOrientationLockType m_prospectiveLock; |
| }; |
| } // namespace WebCore |