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

Unified Diff: third_party/WebKit/Source/modules/budget/WorkerNavigatorBudget.h

Issue 2273743002: Framework and tests for WorkerNavigatorBudget (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mojo_service
Patch Set: rebased 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/budget/WorkerNavigatorBudget.h
diff --git a/third_party/WebKit/Source/modules/budget/WorkerNavigatorBudget.h b/third_party/WebKit/Source/modules/budget/WorkerNavigatorBudget.h
new file mode 100644
index 0000000000000000000000000000000000000000..552f38d74bb22a0560ad23a091d37032b853d841
--- /dev/null
+++ b/third_party/WebKit/Source/modules/budget/WorkerNavigatorBudget.h
@@ -0,0 +1,39 @@
+// 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 WorkerNavigatorBudget_h
+#define WorkerNavigatorBudget_h
+
+#include "platform/Supplementable.h"
+#include "platform/heap/GarbageCollected.h"
+#include "wtf/Noncopyable.h"
+
+namespace blink {
+
+class BudgetService;
+class WorkerNavigator;
+
+// This exposes the budget object on the WorkerNavigator partial interface.
+class WorkerNavigatorBudget final : public GarbageCollected<WorkerNavigatorBudget>, public Supplement<WorkerNavigator> {
+ USING_GARBAGE_COLLECTED_MIXIN(WorkerNavigatorBudget);
+ WTF_MAKE_NONCOPYABLE(WorkerNavigatorBudget);
+
+public:
+ static WorkerNavigatorBudget& from(WorkerNavigator&);
+
+ static BudgetService* budget(WorkerNavigator&);
+ BudgetService* budget();
+
+ DECLARE_VIRTUAL_TRACE();
+
+private:
+ WorkerNavigatorBudget();
+ static const char* supplementName();
+
+ Member<BudgetService> m_budget;
+};
+
+} // namespace blink
+
+#endif // WorkerNavigatorBudget_h

Powered by Google App Engine
This is Rietveld 408576698