Chromium Code Reviews| 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 BudgetState_h | |
| 6 #define BudgetState_h | |
| 7 | |
| 8 #include "bindings/core/v8/ScriptWrappable.h" | |
| 9 #include "core/dom/DOMTimeStamp.h" | |
| 10 #include "platform/heap/GarbageCollected.h" | |
| 11 | |
| 12 namespace blink { | |
| 13 | |
| 14 class BudgetService; | |
| 15 class Navigator; | |
| 16 | |
| 17 // This exposes the budget object on the Navigator partial interface. | |
|
Peter Beverloo
2016/08/23 09:46:39
update comment
harkness
2016/08/23 10:06:17
Done.
| |
| 18 class BudgetState final : public GarbageCollected<BudgetState>, public ScriptWra ppable { | |
| 19 DEFINE_WRAPPERTYPEINFO(); | |
| 20 | |
| 21 public: | |
| 22 BudgetState(); | |
| 23 BudgetState(double budgetAt, DOMTimeStamp); | |
| 24 BudgetState(const BudgetState& other); | |
| 25 | |
| 26 double budgetAt() const { return m_budgetAt; } | |
| 27 DOMTimeStamp time() const { return m_time; } | |
| 28 | |
| 29 void setBudgetAt(const double budgetAt) { m_budgetAt = budgetAt; } | |
| 30 void setTime(const DOMTimeStamp& time) { m_time = time; } | |
| 31 | |
| 32 DEFINE_INLINE_TRACE() {} | |
| 33 | |
| 34 private: | |
| 35 double m_budgetAt; | |
| 36 DOMTimeStamp m_time; | |
| 37 }; | |
| 38 | |
| 39 } // namespace blink | |
| 40 | |
| 41 #endif // BudgetState_h | |
| OLD | NEW |