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 BudgetState interface which is returned from BudgetService |
| 18 // when there is a GetBudget call. |
| 19 class BudgetState final : public GarbageCollected<BudgetState>, public ScriptWra
ppable { |
| 20 DEFINE_WRAPPERTYPEINFO(); |
| 21 |
| 22 public: |
| 23 BudgetState(); |
| 24 BudgetState(double budgetAt, DOMTimeStamp); |
| 25 BudgetState(const BudgetState& other); |
| 26 |
| 27 double budgetAt() const { return m_budgetAt; } |
| 28 DOMTimeStamp time() const { return m_time; } |
| 29 |
| 30 void setBudgetAt(const double budgetAt) { m_budgetAt = budgetAt; } |
| 31 void setTime(const DOMTimeStamp& time) { m_time = time; } |
| 32 |
| 33 DEFINE_INLINE_TRACE() {} |
| 34 |
| 35 private: |
| 36 double m_budgetAt; |
| 37 DOMTimeStamp m_time; |
| 38 }; |
| 39 |
| 40 } // namespace blink |
| 41 |
| 42 #endif // BudgetState_h |
OLD | NEW |