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

Unified Diff: third_party/WebKit/Source/modules/budget/BudgetService.h

Issue 2309863002: Plumb reserve method of the BudgetAPI (Closed)
Patch Set: Rename BudgetServiceErrorType::NO_ERROR to ::NONE to avoid Windows constant name clash. 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/budget/BudgetService.h
diff --git a/third_party/WebKit/Source/modules/budget/BudgetService.h b/third_party/WebKit/Source/modules/budget/BudgetService.h
index 73c0313040c74549a0049b50e20cd3a3767ea833..ae84593fe2e76bdad998da204fc1aea990add434 100644
--- a/third_party/WebKit/Source/modules/budget/BudgetService.h
+++ b/third_party/WebKit/Source/modules/budget/BudgetService.h
@@ -30,15 +30,17 @@ public:
~BudgetService();
// Implementation of the Budget API interface.
- ScriptPromise getCost(ScriptState*, const AtomicString& actionType);
+ ScriptPromise getCost(ScriptState*, const AtomicString& operation);
ScriptPromise getBudget(ScriptState*);
+ ScriptPromise reserve(ScriptState*, const AtomicString& operation);
DEFINE_INLINE_TRACE() {}
private:
// Callbacks from the BudgetService to the blink layer.
void gotCost(ScriptPromiseResolver*, double cost) const;
- void gotBudget(ScriptPromiseResolver*, const mojo::WTFArray<mojom::blink::BudgetStatePtr> expectations) const;
+ void gotBudget(ScriptPromiseResolver*, mojom::blink::BudgetServiceErrorType, const mojo::WTFArray<mojom::blink::BudgetStatePtr> expectations) const;
+ void gotReservation(ScriptPromiseResolver*, mojom::blink::BudgetServiceErrorType, bool success) const;
// Error handler for use if mojo service doesn't connect.
void onConnectionError();

Powered by Google App Engine
This is Rietveld 408576698