OLD | NEW |
(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 |
| 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; |
| 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 |
OLD | NEW |