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

Side by Side Diff: third_party/WebKit/public/platform/modules/budget_service/budget_service.mojom

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, 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
« no previous file with comments | « third_party/WebKit/public/platform/modules/budget_service/OWNERS ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 module blink.mojom;
6
7 import "url/mojo/origin.mojom";
8
9 enum BudgetOperationType {
10 SILENT_PUSH
dcheng 2016/08/25 00:33:48 FWIW, an enum with one value looks kinda funny.
11 };
12
13 // Structure representing the budget at points in time in the future.
14 struct BudgetState {
15 // Amount of budget that will be available. This should be the lower bound of
16 // the budget between this time and the previous time.
17 double budget_at;
18
19 // Time at which the budget is available, in milliseconds since 00:00:00 UTC
20 // on 1 January 1970, at which the budget_at will be valid.
21 double time;
dcheng 2016/08/25 00:33:48 Can we add a TODO here to transition to base::Time
22 };
23
24 // Service through which Blink can query for the cost of particular actions and
25 // for the budget available for an origin.
26 interface BudgetService {
27 GetCost(BudgetOperationType operation) => (double cost);
28 GetBudget(url.mojom.Origin origin) => (array<BudgetState> budget);
29 };
30
OLDNEW
« no previous file with comments | « third_party/WebKit/public/platform/modules/budget_service/OWNERS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698