Coverage Report

Created: 2018-09-25 14:53

/src/mozilla-central/dom/performance/PerformanceMeasure.h
Line
Count
Source (jump to first uncovered line)
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/. */
6
7
#ifndef mozilla_dom_performancemeasure_h___
8
#define mozilla_dom_performancemeasure_h___
9
10
#include "mozilla/dom/PerformanceEntry.h"
11
12
namespace mozilla {
13
namespace dom {
14
15
// http://www.w3.org/TR/user-timing/#performancemeasure
16
class PerformanceMeasure final : public PerformanceEntry
17
{
18
public:
19
  PerformanceMeasure(nsISupports* aParent,
20
                     const nsAString& aName,
21
                     DOMHighResTimeStamp aStartTime,
22
                     DOMHighResTimeStamp aEndTime);
23
24
  virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
25
26
  virtual DOMHighResTimeStamp StartTime() const override
27
0
  {
28
0
    return mStartTime;
29
0
  }
30
31
  virtual DOMHighResTimeStamp Duration() const override
32
0
  {
33
0
    return mDuration;
34
0
  }
35
36
  size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const override;
37
38
protected:
39
  virtual ~PerformanceMeasure();
40
  DOMHighResTimeStamp mStartTime;
41
  DOMHighResTimeStamp mDuration;
42
};
43
44
} // namespace dom
45
} // namespace mozilla
46
47
#endif /* mozilla_dom_performancemeasure_h___ */