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

Side by Side Diff: third_party/WebKit/Source/modules/budget/Budget.h

Issue 2110833002: Basic framework for Budget API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed Navigator member and exception, other nits Created 4 years, 4 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 Budget_h
6 #define Budget_h
7
8 #include "bindings/core/v8/ScriptWrappable.h"
9 #include "modules/ModulesExport.h"
10
11 namespace blink {
12
13 class ExceptionState;
14 class Navigator;
Peter Beverloo 2016/08/05 14:33:19 nit: ExceptionState and Navigator are unused
harkness 2016/08/08 12:07:36 Done.
15 class ScriptPromise;
16 class ScriptState;
17
18 // This is the entry point into the browser for the Budget API, which is
19 // designed to give origins the ability to perform background operations
20 // on the user's behalf.
21 class Budget final : public GarbageCollected<Budget> , public ScriptWrappable {
Peter Beverloo 2016/08/05 14:33:19 nit: no space before the comma
harkness 2016/08/08 12:07:36 Done.
22 DEFINE_WRAPPERTYPEINFO();
23
24 public:
25 static Budget* create()
26 {
27 return new Budget();
28 }
29
30 ScriptPromise getCost(ScriptState*, const AtomicString& actionType);
31 ScriptPromise getBudget(ScriptState*);
32
33 DECLARE_TRACE();
34
35 private:
36 explicit Budget();
Peter Beverloo 2016/08/05 14:33:19 nit: drop "explicit"
harkness 2016/08/08 12:07:36 Done.
37 };
38
39 } // namespace blink
40
41 #endif // Budget_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698