OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2016 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 NavigatorBudget_h | |
6 #define NavigatorBudget_h | |
7 | |
8 #include "bindings/core/v8/ScriptWrappable.h" | |
9 #include "modules/ModulesExport.h" | |
10 #include "platform/Supplementable.h" | |
11 #include "wtf/Noncopyable.h" | |
12 | |
13 namespace blink { | |
14 | |
15 class ExceptionState; | |
16 class Navigator; | |
17 class ScriptPromise; | |
18 class ScriptState; | |
19 | |
20 // This is the entry point into the browser for the Budget API, which is | |
21 // designed to give origins the ability to perform background | |
22 // operations on the user's behalf. | |
Peter Beverloo
2016/07/22 12:27:01
micro nit: wrapping in this comment looks arbitrar
harkness
2016/08/03 09:34:05
Done.
| |
23 class NavigatorBudget final | |
24 : public GarbageCollected<NavigatorBudget> | |
25 , public Supplement<Navigator> { | |
26 USING_GARBAGE_COLLECTED_MIXIN(NavigatorBudget); | |
27 WTF_MAKE_NONCOPYABLE(NavigatorBudget); | |
28 | |
29 public: | |
30 const char* supplementName(); | |
31 NavigatorBudget& from(Navigator&); | |
32 | |
33 static ScriptPromise getCost(ScriptState*, Navigator&, const AtomicString& a ctionType); | |
34 static ScriptPromise getBudget(ScriptState*, Navigator&, ExceptionState&); | |
35 static ScriptPromise getBudgetDetails(ScriptState*, Navigator&, ExceptionSta te&); | |
36 | |
37 DECLARE_VIRTUAL_TRACE(); | |
Peter Beverloo
2016/07/22 12:27:01
DECLARE_TRACE? I don't think we need the virtualne
harkness
2016/08/03 09:34:05
Done.
| |
38 | |
39 private: | |
40 explicit NavigatorBudget(Navigator&); | |
41 }; | |
42 | |
43 } // namespace blink | |
44 | |
45 #endif // NavigatorBudget_h | |
OLD | NEW |