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/WebLockOrientationCallback.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 WebCore { | |
15 | |
16 class ScriptPromiseResolverWithContext; | |
17 | |
18 // LockOrientationCallback is an implementation of WebLockOrientationCallback | |
19 // that will resolve the underlying promise depending on the result passed to | |
20 // the callback. | |
21 class LockOrientationCallback FINAL : public blink::WebLockOrientationCallback { | |
22 public: | |
23 LockOrientationCallback(PassRefPtr<ScriptPromiseResolverWithContext>); | |
Inactive
2014/05/21 16:01:45
explicit?
| |
24 virtual ~LockOrientationCallback(); | |
25 | |
26 virtual void onSuccess(unsigned angle, blink::WebScreenOrientationType) OVER RIDE; | |
27 virtual void onError(ErrorType) OVERRIDE; | |
28 | |
29 private: | |
30 RefPtr<ScriptPromiseResolverWithContext> m_resolver; | |
31 WTF_MAKE_NONCOPYABLE(LockOrientationCallback); | |
Inactive
2014/05/21 16:02:50
nit: I think we usually have this one at the top o
| |
32 }; | |
33 | |
34 } // namespace WebCore | |
35 | |
36 #endif // LockOrientationCallback_h | |
37 | |
OLD | NEW |