Bug 1936278 - Prevent search mode chiclet from being dismissed when clicking in page...
[gecko.git] / dom / performance / PerformanceWorker.h
blobf0539aa02d1557b0b7b0f6afcc6e241d8cb7611c
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #ifndef mozilla_dom_PerformanceWorker_h
8 #define mozilla_dom_PerformanceWorker_h
10 #include "Performance.h"
12 namespace mozilla::dom {
14 class WorkerGlobalScope;
16 class PerformanceWorker final : public Performance {
17 public:
18 explicit PerformanceWorker(WorkerGlobalScope* aGlobalScope);
20 PerformanceStorage* AsPerformanceStorage() override {
21 MOZ_CRASH("This should not be called on workers.");
22 return nullptr;
25 virtual PerformanceTiming* Timing() override {
26 MOZ_CRASH("This should not be called on workers.");
27 return nullptr;
30 virtual PerformanceNavigation* Navigation() override {
31 MOZ_CRASH("This should not be called on workers.");
32 return nullptr;
35 virtual void SetFCPTimingEntry(PerformancePaintTiming* aEntry) override {
36 MOZ_CRASH("This should not be called on workers.");
39 TimeStamp CreationTimeStamp() const override;
41 DOMHighResTimeStamp CreationTime() const override;
43 virtual void GetMozMemory(JSContext* aCx,
44 JS::MutableHandle<JSObject*> aObj) override {
45 MOZ_CRASH("This should not be called on workers.");
48 virtual nsDOMNavigationTiming* GetDOMTiming() const override {
49 MOZ_CRASH("This should not be called on workers.");
50 return nullptr;
53 virtual uint64_t GetRandomTimelineSeed() override;
55 virtual nsITimedChannel* GetChannel() const override {
56 MOZ_CRASH("This should not be called on workers.");
57 return nullptr;
60 void QueueNavigationTimingEntry() override {
61 MOZ_CRASH("This should not be called on workers.");
64 void UpdateNavigationTimingEntry() override {
65 MOZ_CRASH("This should not be called on workers.");
68 void InsertEventTimingEntry(PerformanceEventTiming*) override {
69 MOZ_CRASH("This should not be called on workers.");
72 void BufferEventTimingEntryIfNeeded(PerformanceEventTiming*) override {
73 MOZ_CRASH("This should not be called on workers.");
76 void DispatchPendingEventTimingEntries() override {
77 MOZ_CRASH("This should not be called on workders.");
80 class EventCounts* EventCounts() override {
81 MOZ_CRASH("This should not be called on workers");
84 protected:
85 ~PerformanceWorker();
87 void InsertUserEntry(PerformanceEntry* aEntry) override;
89 void DispatchBufferFullEvent() override {
90 // Nothing to do here. See bug 1432758.
94 } // namespace mozilla::dom
96 #endif // mozilla_dom_PerformanceWorker_h