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 BudgetAPI, which is | |
Peter Beverloo
2016/07/01 13:21:59
nit: BudgetAPI -> Budget API
harkness
2016/07/20 09:41:48
Done.
| |
21 // designed to give Service Workers the ability to perform background | |
Peter Beverloo
2016/07/01 13:21:59
Service Workers -> origins
harkness
2016/07/20 09:41:48
Done.
| |
22 // operations on the user's behalf. | |
23 class MODULES_EXPORT NavigatorBudget final | |
Peter Beverloo
2016/07/01 13:21:59
Why do you need MODULES_EXPORT here?
harkness
2016/07/20 09:41:48
Removed.
| |
24 : public GarbageCollectedFinalized<NavigatorBudget> | |
Peter Beverloo
2016/07/01 13:21:59
Why do you need a finalizer here? This can just be
harkness
2016/07/20 09:41:48
Updated it.
| |
25 , public Supplement<Navigator> { | |
26 USING_GARBAGE_COLLECTED_MIXIN(NavigatorBudget); | |
27 WTF_MAKE_NONCOPYABLE(NavigatorBudget); | |
28 | |
29 public: | |
30 virtual ~NavigatorBudget(); | |
31 | |
32 const char* supplementName(); | |
33 NavigatorBudget& from(Navigator&); | |
34 | |
35 static ScriptPromise getCost(ScriptState*, Navigator&, const AtomicString& a ctionType); | |
36 static ScriptPromise getBudget(ScriptState*, Navigator&, ExceptionState&); | |
37 static ScriptPromise getBudgetDetails(ScriptState*, Navigator&, ExceptionSta te&); | |
38 | |
39 DEFINE_INLINE_TRACE() {} | |
40 | |
41 private: | |
42 explicit NavigatorBudget(Navigator&); | |
43 }; | |
44 | |
45 } // namespace blink | |
46 | |
47 #endif // NavigatorBudget_h | |
OLD | NEW |