Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(650)

Side by Side Diff: third_party/WebKit/Source/modules/budget/BudgetState.h

Issue 2231873002: Added budget_service.mojom (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@budget_api
Patch Set: Split tests, cleaned up constructor, and nits Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698