Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef LockOrientationCallback_h | |
| 6 #define LockOrientationCallback_h | |
| 7 | |
| 8 #include "public/platform/WebCallbacks.h" | |
| 9 #include "public/platform/WebScreenOrientationType.h" | |
| 10 #include "wtf/Noncopyable.h" | |
| 11 #include "wtf/PassRefPtr.h" | |
| 12 #include "wtf/RefPtr.h" | |
| 13 | |
| 14 namespace blink { | |
| 15 class WebDOMException; | |
| 16 } | |
| 17 | |
| 18 namespace WebCore { | |
| 19 | |
| 20 class ScriptPromiseResolverWithContext; | |
| 21 | |
| 22 class LockOrientationCallback FINAL : public blink::WebCallbacks<blink::WebScree nOrientationType, 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
| |
| 23 public: | |
| 24 LockOrientationCallback(PassRefPtr<ScriptPromiseResolverWithContext>); | |
| 25 virtual ~LockOrientationCallback(); | |
| 26 | |
| 27 virtual void onSuccess(blink::WebScreenOrientationType*) OVERRIDE; | |
| 28 virtual void onError(blink::WebDOMException*) OVERRIDE; | |
| 29 | |
| 30 private: | |
| 31 RefPtr<ScriptPromiseResolverWithContext> m_resolver; | |
| 32 WTF_MAKE_NONCOPYABLE(LockOrientationCallback); | |
| 33 }; | |
| 34 | |
| 35 } // namespace WebCore | |
| 36 | |
| 37 #endif // LockOrientationCallback_h | |
| 38 | |
| OLD | NEW |