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..8d0c05734516320f4c04dab6baf482e76acfdedf |
--- /dev/null |
+++ b/third_party/WebKit/Source/modules/budget/BudgetState.h |
@@ -0,0 +1,43 @@ |
+// 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" |
Peter Beverloo
2016/08/22 17:57:55
#include "platform/heap/GarbageCollected.h"
harkness
2016/08/23 09:38:19
Done.
|
+ |
+namespace blink { |
+ |
+class BudgetService; |
+class Navigator; |
+ |
+// This exposes the budget object on the Navigator partial interface. |
+class BudgetState final : public GarbageCollected<BudgetState>, public ScriptWrappable { |
+ DEFINE_WRAPPERTYPEINFO(); |
+ |
+public: |
+ BudgetState(); |
+ 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.
|
+ : m_budgetAt(budgetAt) |
+ , m_time(time) |
+ { |
+ } |
+ 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: |
Peter Beverloo
2016/08/22 17:57:55
nit: blank line above here
harkness
2016/08/23 09:38:19
Done.
|
+ double m_budgetAt; |
+ DOMTimeStamp m_time; |
+}; |
+ |
+} // namespace blink |
+ |
+#endif // BudgetState_h |