Chromium Code Reviews| 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..94f2d83a3d6d436a6394d5ce7292e52ea336ac5a |
| --- /dev/null |
| +++ b/Source/modules/screen_orientation/LockOrientationCallback.h |
| @@ -0,0 +1,37 @@ |
| +// 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/WebLockOrientationCallback.h" |
| +#include "public/platform/WebScreenOrientationType.h" |
| +#include "wtf/Noncopyable.h" |
| +#include "wtf/PassRefPtr.h" |
| +#include "wtf/RefPtr.h" |
| + |
| +namespace WebCore { |
| + |
| +class ScriptPromiseResolverWithContext; |
| + |
| +// LockOrientationCallback is an implementation of WebLockOrientationCallback |
| +// that will resolve the underlying promise depending on the result passed to |
| +// the callback. |
| +class LockOrientationCallback FINAL : public blink::WebLockOrientationCallback { |
| +public: |
| + LockOrientationCallback(PassRefPtr<ScriptPromiseResolverWithContext>); |
|
Inactive
2014/05/21 16:01:45
explicit?
|
| + virtual ~LockOrientationCallback(); |
| + |
| + virtual void onSuccess(unsigned angle, blink::WebScreenOrientationType) OVERRIDE; |
| + virtual void onError(ErrorType) OVERRIDE; |
| + |
| +private: |
| + RefPtr<ScriptPromiseResolverWithContext> m_resolver; |
| + WTF_MAKE_NONCOPYABLE(LockOrientationCallback); |
|
Inactive
2014/05/21 16:02:50
nit: I think we usually have this one at the top o
|
| +}; |
| + |
| +} // namespace WebCore |
| + |
| +#endif // LockOrientationCallback_h |
| + |