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

Side by Side Diff: third_party/WebKit/Source/modules/budget_service/NavigatorBudget.h

Issue 2110833002: Basic framework for Budget API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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
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 #ifndef NavigatorBudget_h
6 #define NavigatorBudget_h
7
8 #include "bindings/core/v8/ScriptWrappable.h"
9 #include "modules/ModulesExport.h"
10 #include "platform/Supplementable.h"
11 #include "wtf/Noncopyable.h"
12
13 namespace blink {
14
15 class ExceptionState;
16 class Navigator;
17 class ScriptPromise;
18 class ScriptState;
19
20 // This is the entry point into the browser for the BudgetAPI, which is
21 // designed to give Service Workers the ability to perform background
22 // operations on the user's behalf.
23 class MODULES_EXPORT NavigatorBudget final
24 : public GarbageCollectedFinalized<NavigatorBudget>
25 , public Supplement<Navigator> {
26 USING_GARBAGE_COLLECTED_MIXIN(NavigatorBudget);
27 WTF_MAKE_NONCOPYABLE(NavigatorBudget);
28
29 public:
haraken 2016/06/29 23:45:40 You need to add DECLARE_TRACE/DEFINE_TRACE. I gues
30 virtual ~NavigatorBudget();
31
32 const char* supplementName();
33 NavigatorBudget& from(Navigator&);
34
35 static ScriptPromise getCost(ScriptState*, Navigator&, const AtomicString& a ctionType);
36 static ScriptPromise getBudget(ScriptState*, Navigator&, ExceptionState&);
37
38 private:
39 explicit NavigatorBudget(Navigator&);
40 };
41
42 } // namespace blink
43
44 #endif // NavigatorBudget_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698