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

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: Add a connection error handler to BudgetService Created 4 years, 4 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 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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698