| 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 Budget_h | |
| 6 #define Budget_h | |
| 7 | |
| 8 #include "bindings/core/v8/ScriptWrappable.h" | |
| 9 #include "modules/ModulesExport.h" | |
| 10 | |
| 11 namespace blink { | |
| 12 | |
| 13 class ScriptPromise; | |
| 14 class ScriptState; | |
| 15 | |
| 16 // This is the entry point into the browser for the Budget API, which is | |
| 17 // designed to give origins the ability to perform background operations | |
| 18 // on the user's behalf. | |
| 19 class Budget final : public GarbageCollected<Budget>, public ScriptWrappable { | |
| 20 DEFINE_WRAPPERTYPEINFO(); | |
| 21 | |
| 22 public: | |
| 23 static Budget* create() | |
| 24 { | |
| 25 return new Budget(); | |
| 26 } | |
| 27 | |
| 28 ScriptPromise getCost(ScriptState*, const AtomicString& actionType); | |
| 29 ScriptPromise getBudget(ScriptState*); | |
| 30 | |
| 31 DEFINE_INLINE_TRACE() {} | |
| 32 | |
| 33 private: | |
| 34 Budget(); | |
| 35 }; | |
| 36 | |
| 37 } // namespace blink | |
| 38 | |
| 39 #endif // Budget_h | |
| OLD | NEW |