Index: third_party/WebKit/Source/modules/budget/BudgetState.h |
diff --git a/third_party/WebKit/Source/modules/budget/BudgetState.h b/third_party/WebKit/Source/modules/budget/BudgetState.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..39e7abf8335807988d0f457c70f7fb556946f89d |
--- /dev/null |
+++ b/third_party/WebKit/Source/modules/budget/BudgetState.h |
@@ -0,0 +1,41 @@ |
+// Copyright 2016 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef BudgetState_h |
+#define BudgetState_h |
+ |
+#include "bindings/core/v8/ScriptWrappable.h" |
+#include "core/dom/DOMTimeStamp.h" |
+#include "platform/heap/GarbageCollected.h" |
+ |
+namespace blink { |
+ |
+class BudgetService; |
+class Navigator; |
+ |
+// 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.
|
+class BudgetState final : public GarbageCollected<BudgetState>, public ScriptWrappable { |
+ DEFINE_WRAPPERTYPEINFO(); |
+ |
+public: |
+ BudgetState(); |
+ BudgetState(double budgetAt, DOMTimeStamp); |
+ BudgetState(const BudgetState& other); |
+ |
+ double budgetAt() const { return m_budgetAt; } |
+ DOMTimeStamp time() const { return m_time; } |
+ |
+ void setBudgetAt(const double budgetAt) { m_budgetAt = budgetAt; } |
+ void setTime(const DOMTimeStamp& time) { m_time = time; } |
+ |
+ DEFINE_INLINE_TRACE() {} |
+ |
+private: |
+ double m_budgetAt; |
+ DOMTimeStamp m_time; |
+}; |
+ |
+} // namespace blink |
+ |
+#endif // BudgetState_h |