Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(322)

Side by Side Diff: Source/modules/wake_lock/WakeLockPromiseResolver.h

Issue 399313003: Initial implementation of API WakeLock. Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Implementation of WakeLock API on JavaScript side. Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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 WakeLockPromiseResolver_h
6 #define WakeLockPromiseResolver_h
7
8 #include "bindings/core/v8/ScriptPromiseResolver.h"
9 #include "public/platform/WebWakeLockType.h"
10
11 namespace blink {
12
13 class WakeLockPromiseResolver {
14 public:
15 static PassOwnPtr<WakeLockPromiseResolver> create(ScriptState*, WebWakeLockT ype);
16
17 void resolve();
18 void reject();
19 ScriptPromise promise();
20 WebWakeLockType type() const { return m_type; }
21 int id() const { return m_id; }
22
23 private:
24 WakeLockPromiseResolver(ScriptState*, WebWakeLockType, int);
25
26 RefPtr<ScriptPromiseResolver> m_resolver;
27 const WebWakeLockType m_type;
28 const int m_id;
29 };
30
31 } // namespace blink
32
33 #endif
OLDNEW
« no previous file with comments | « Source/modules/wake_lock/WakeLockController.cpp ('k') | Source/modules/wake_lock/WakeLockPromiseResolver.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698