Index: third_party/WebKit/Source/modules/budget_service/NavigatorBudget.h |
diff --git a/third_party/WebKit/Source/modules/budget_service/NavigatorBudget.h b/third_party/WebKit/Source/modules/budget_service/NavigatorBudget.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..307e917ce6a988cfce6060eecd2f9388a9017587 |
--- /dev/null |
+++ b/third_party/WebKit/Source/modules/budget_service/NavigatorBudget.h |
@@ -0,0 +1,44 @@ |
+// Copyright 2016 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef NavigatorBudget_h |
+#define NavigatorBudget_h |
+ |
+#include "bindings/core/v8/ScriptWrappable.h" |
+#include "modules/ModulesExport.h" |
+#include "platform/Supplementable.h" |
+#include "wtf/Noncopyable.h" |
+ |
+namespace blink { |
+ |
+class ExceptionState; |
+class Navigator; |
+class ScriptPromise; |
+class ScriptState; |
+ |
+// This is the entry point into the browser for the BudgetAPI, which is |
+// designed to give Service Workers the ability to perform background |
+// operations on the user's behalf. |
+class MODULES_EXPORT NavigatorBudget final |
+ : public GarbageCollectedFinalized<NavigatorBudget> |
+ , public Supplement<Navigator> { |
+ USING_GARBAGE_COLLECTED_MIXIN(NavigatorBudget); |
+ WTF_MAKE_NONCOPYABLE(NavigatorBudget); |
+ |
+public: |
haraken
2016/06/29 23:45:40
You need to add DECLARE_TRACE/DEFINE_TRACE. I gues
|
+ virtual ~NavigatorBudget(); |
+ |
+ const char* supplementName(); |
+ NavigatorBudget& from(Navigator&); |
+ |
+ static ScriptPromise getCost(ScriptState*, Navigator&, const AtomicString& actionType); |
+ static ScriptPromise getBudget(ScriptState*, Navigator&, ExceptionState&); |
+ |
+private: |
+ explicit NavigatorBudget(Navigator&); |
+}; |
+ |
+} // namespace blink |
+ |
+#endif // NavigatorBudget_h |