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 #include "modules/budget/Budget.h" | |
| 6 | |
| 7 #include "bindings/core/v8/ScriptPromise.h" | |
| 8 #include "bindings/core/v8/ScriptPromiseResolver.h" | |
| 9 #include "bindings/core/v8/ScriptState.h" | |
| 10 #include "core/dom/DOMException.h" | |
| 11 #include "core/dom/ExceptionCode.h" | |
| 12 #include "core/frame/Navigator.h" | |
| 13 | |
| 14 namespace blink { | |
| 15 | |
| 16 Budget::Budget(Navigator* navigator) | |
| 17 : m_navigator(navigator) | |
| 18 { | |
| 19 DCHECK(navigator); | |
| 20 } | |
| 21 | |
| 22 // static | |
| 23 ScriptPromise Budget::getCost(ScriptState* state, const AtomicString& actionType ) | |
| 24 { | |
| 25 // TODO(harkness): Trigger the cost calculation. | |
| 26 return ScriptPromise::rejectWithDOMException(state, DOMException::create(Not SupportedError, "Not yet implemented")); | |
| 27 } | |
| 28 | |
| 29 // static | |
| 30 ScriptPromise Budget::getBudget(ScriptState* state, ExceptionState& exception) | |
|
Peter Beverloo
2016/08/03 13:25:54
nit: drop the RaisesException annotation in the ID
harkness
2016/08/04 14:18:23
Done.
| |
| 31 { | |
| 32 // TODO(harkness): Trigger the budget calculation. | |
| 33 return ScriptPromise::rejectWithDOMException(state, DOMException::create(Not SupportedError, "Not yet implemented")); | |
| 34 } | |
| 35 | |
| 36 DEFINE_TRACE(Budget) | |
| 37 { | |
| 38 visitor->trace(m_navigator); | |
| 39 } | |
| 40 | |
| 41 } // namespace blink | |
| OLD | NEW |