| Index: Source/modules/wake_lock/WakeLockPromiseResolver.h
|
| diff --git a/Source/modules/wake_lock/WakeLockPromiseResolver.h b/Source/modules/wake_lock/WakeLockPromiseResolver.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..c45bf39a92d19cda9c163207d92f22dad15d4bbb
|
| --- /dev/null
|
| +++ b/Source/modules/wake_lock/WakeLockPromiseResolver.h
|
| @@ -0,0 +1,33 @@
|
| +// 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 WakeLockPromiseResolver_h
|
| +#define WakeLockPromiseResolver_h
|
| +
|
| +#include "bindings/core/v8/ScriptPromiseResolver.h"
|
| +#include "public/platform/WebWakeLockType.h"
|
| +
|
| +namespace blink {
|
| +
|
| +class WakeLockPromiseResolver {
|
| +public:
|
| + static PassOwnPtr<WakeLockPromiseResolver> create(ScriptState*, WebWakeLockType);
|
| +
|
| + void resolve();
|
| + void reject();
|
| + ScriptPromise promise();
|
| + WebWakeLockType type() const { return m_type; }
|
| + int id() const { return m_id; }
|
| +
|
| +private:
|
| + WakeLockPromiseResolver(ScriptState*, WebWakeLockType, int);
|
| +
|
| + RefPtr<ScriptPromiseResolver> m_resolver;
|
| + const WebWakeLockType m_type;
|
| + const int m_id;
|
| +};
|
| +
|
| +} // namespace blink
|
| +
|
| +#endif
|
|
|