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" | |
|
Peter Beverloo
2016/08/22 17:57:55
#include "platform/heap/GarbageCollected.h"
harkness
2016/08/23 09:38:19
Done.
| |
| 10 | |
| 11 namespace blink { | |
| 12 | |
| 13 class BudgetService; | |
| 14 class Navigator; | |
| 15 | |
| 16 // This exposes the budget object on the Navigator partial interface. | |
| 17 class BudgetState final : public GarbageCollected<BudgetState>, public ScriptWra ppable { | |
| 18 DEFINE_WRAPPERTYPEINFO(); | |
| 19 | |
| 20 public: | |
| 21 BudgetState(); | |
| 22 BudgetState(const double budgetAt, const DOMTimeStamp& time) | |
|
Peter Beverloo
2016/08/22 17:57:55
nit: no need to mark scalar types as "const" (goes
harkness
2016/08/23 09:38:19
Done.
| |
| 23 : m_budgetAt(budgetAt) | |
| 24 , m_time(time) | |
| 25 { | |
| 26 } | |
| 27 BudgetState(const BudgetState& other); | |
| 28 | |
| 29 double budgetAt() const { return m_budgetAt; } | |
| 30 DOMTimeStamp time() const { return m_time; } | |
| 31 | |
| 32 void setBudgetAt(const double budgetAt) { m_budgetAt = budgetAt; } | |
| 33 void setTime(const DOMTimeStamp& time) { m_time = time; } | |
| 34 | |
| 35 DEFINE_INLINE_TRACE() {} | |
| 36 private: | |
|
Peter Beverloo
2016/08/22 17:57:55
nit: blank line above here
harkness
2016/08/23 09:38:19
Done.
| |
| 37 double m_budgetAt; | |
| 38 DOMTimeStamp m_time; | |
| 39 }; | |
| 40 | |
| 41 } // namespace blink | |
| 42 | |
| 43 #endif // BudgetState_h | |
| OLD | NEW |