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

Side by Side Diff: Source/modules/wake_lock/WakeLock.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 WakeLock_h
6 #define WakeLock_h
7
8 #include "bindings/core/v8/ScriptPromise.h"
9 #include "bindings/core/v8/ScriptWrappable.h"
10 #include "core/dom/ActiveDOMObject.h"
11
12 namespace blink {
13
14 class Document;
15 class ExecutionContext;
16 class Navigator;
17 class Page;
18
19 class WakeLock FINAL
20 : public RefCountedWillBeGarbageCollectedFinalized<WakeLock>
21 , public ScriptWrappable
22 , public ActiveDOMObject {
23 public:
24 static PassRefPtrWillBeRawPtr<WakeLock> create(ExecutionContext*);
25 virtual ~WakeLock();
26 void trace(Visitor*) { }
27
28 Document* document() const;
mlamouri (slow - plz ping) 2014/08/18 12:15:52 Could that be private like page()?
redchenko 2014/08/19 16:42:20 Done.
29 LocalFrame* frame() const;
mlamouri (slow - plz ping) 2014/08/18 12:15:52 You do not seem to use frame().
redchenko 2014/08/19 16:42:20 Done. frame() was removed.
30
31 ScriptPromise request(ScriptState*, const AtomicString& type);
32 ScriptPromise release(ScriptState*, const AtomicString& type);
33 bool isHeld(const AtomicString& type);
34
35 private:
36 explicit WakeLock(ExecutionContext*);
37
38 Page* page() const;
39 };
40
41 } // namespace WebCore
42
43 #endif // WakeLock_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698