Chromium Code Reviews| 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 OperationType { | |
|
johnme
2016/08/17 13:54:02
Nit: Might need to be namespaced? e.g. BudgetOpera
harkness
2016/08/18 10:23:26
Good idea.
| |
| 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. | |
|
johnme
2016/08/17 13:54:02
Please be more specific, e.g. "A lower bound for t
harkness
2016/08/18 10:23:26
Done.
| |
| 16 double budget_at; | |
| 17 | |
| 18 // Time at which the budget is available, in milliseconds since 00:00:00 UTC | |
| 19 // on 1 January 1970, at which the budget_at will be valid. | |
| 20 double time; | |
| 21 }; | |
| 22 | |
| 23 // Service through which Blink can query for the cost of particular actions and | |
| 24 // for the budget available for an origin. | |
| 25 interface BudgetService { | |
| 26 GetCost(OperationType operation) => (double cost); | |
| 27 GetBudget(url.mojom.Origin origin) => (array<BudgetState> budget); | |
| 28 }; | |
| 29 | |
| OLD | NEW |